vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi guys, i am doin a project in HPC. i am just a beginner in databases.so i just wanna know if there is any function in SQL which lets me to jump to a particular record directly.say something like 'gotorecord' or somethin... |
| |||
| moses: > hi guys, i am doin a project in HPC. High Performance Computer, Handheld PC, or something else? > i am just a beginner in databases. > so i just wanna know if there is any function in SQL which > lets me to jump to a particular record directly.say something like > 'gotorecord' or somethin... I'm afraid you're completely on the wrong track (or I am misunderstanding your question). Databases are used to store, filter and retrieve data. In a database, you don't "jump to a record". Of course, your _application_ may retrieve a record from the database, and do whatever you want it to do with that set of data. Perhaps (I'm just guessing here) you want to process all 'records' from a table, starting from a certain value upwards. As in: "return all sales in recent years, starting from the year 2005". If that's what you want, use the WHERE clause of the SELECT statement to specify the range, and the ORDER BY clause to get the result in a proper order. You application will then loop through the result. -- Erick "Given a conflict, Murphy's law supercedes Newton's." |
| |||
| moses <arkoshy@gmail.com> wrote in news:a3575cc5-e9ff-417b-8088- 13f6727db8b7@s37g2000prg.googlegroups.com: > hi guys, i am doin a project in HPC. i am just a beginner in > databases.so i just wanna know if there is any function in SQL which > lets me to jump to a particular record directly.say something like > 'gotorecord' or somethin... A database table is like a basket of colored balls. Which ball is ball #N?????????????? |
| |||
| On Mar 15, 2:22 am, moses <arko...@gmail.com> wrote: > hi guys, i am doin a project in HPC. i am just a beginner in > databases.so i just wanna know if there is any function in SQL which > lets me to jump to a particular record directly.say something like > 'gotorecord' or somethin... If the table has a primary key that's auto-incremented, you can: select * from table where column = value Where, "table" is your table name, "column" is the name of the auto- increment column, and "value" is the record number you're looking for. That's as close to "gotorecord" as you're ever going to get. But the very nature of your question indicates you don't grok the RDBMS paradigm at all. Yes, I know you're a beginner, that's Ok, but there are some fundamental concepts that you just NEED to GET. Maybe if you explained a little what you're trying to do, at a higher conceptual level, folks here might give you clues what directions you should be looking in. |
| |||
| Ana C. Dent: > A database table is like a basket of colored balls. > Which ball is ball #N?????????????? Have another look. It's that yellow ball at the bottom, with the big "N" on its back. Right next to ball-Y. |
| |||
| On Mar 15, 8:24 am, "Ana C. Dent" <anaced...@hotmail.com> wrote: > moses <arko...@gmail.com> wrote in news:a3575cc5-e9ff-417b-8088- > 13f6727db...@s37g2000prg.googlegroups.com: > > > hi guys, i am doin a project in HPC. i am just a beginner in > > databases.so i just wanna know if there is any function in SQL which > > lets me to jump to a particular record directly.say something like > > 'gotorecord' or somethin... > > A database table is like a basket of colored balls. > Which ball is ball #N?????????????? That's a great analogy! :-) |
| |||
| > hi guys, i am doin a project in HPC. i am just a beginner in > databases.so i just wanna know if there is any function in SQL which > lets me to jump to a particular record directly.say something like > 'gotorecord' or somethin... As others already said, there is no fixed order in a database. Better put: there is no _single_ fixed order. There are as many orders as you like, and they are implemented with indexes. Many tables have an autonumber column with a primary key. That is the closest thing to a record position. But it is better than just a position: it remains the same through the whole life of the table. So positions will not be reused. Now to the question: is there a GOTO? Yes, there is. SELECT is by far the most used data retrieval command, but there is another one, that is very MySQL specific: HANDLER. The HANDLER command allows you do things the ISAM way: this table, that index, number 7 please. Oh, and pass me the next one as well, will you? Again, this command is rarely used (although I use it quite often, but not as a GOTO). I would not recommend beginners to use HANDLER, as it can give you dirty data. You should know what it does exactly and you should know what you are doing. If you describe what you want to select, we can help you with the appropriate queries. Best regards, -- Willem Bogaerts Application smith Kratz B.V. http://www.kratz.nl/ |
| |||
| Jerry Stuckle: NNTP-Posting-Date: Mon, 17 Mar 2008 07:39:26 -0500 Date: Mon, 17 Mar 2008 08:39:18 -0500 From: Jerry Stuckle <...> > How many rows are we talking about, anyway? Jerry, would you please have a look at your system's time setting? If I'm not mistaken, it appears as if you're one hour ahead of The Rest Of Us. Thanks -- Erick |
| |||
| moses wrote: > On Mar 17, 6:22 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> I doubt that will make a search faster. The overhead of splitting the >> request then joining the output would probably be much higher than >> letting MySQL do it itself. Additionally, multiple nodes should not be >> accessing the same physical table. >> > The overhead involved is not a problem as i am using a MPI program to > take care of that.And since the queries run on each nodes is the > same ,but on different records,there shouldn't be a problem of > splitting and joining them together. > But i would like to know more about what u said about why multiple > nodes cant access the same table..is it really a constraint set by the > DBMS? > I said they can't access the same *physical* table. It's not a good idea, and can lead to corrupt data - just like it can when you have multiple programs accessing any other file. So that means you need to replicate your database across all nodes, which is more overhead. And yes, you will have a lot more overhead than just communications between nodes. Everything from parsing the SQL multiple times to merging and sorting the results from multiple nodes. Not to mention the network traffic between systems. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| ||||
| On Mar 17, 6:39*pm, Jerry Stuckle <jstuck...@attglobal.net> wrote: > > How many rows are we talking about, anyway? > Well our project is meant for huge databases.We are currently targeting the student database in a university.So instead of a single machine processing through tonnes of records,which is extrememly slow,we were thinkin of making a cluster of computers to search this database.The main database will be stored in a central server which is accessiible to these nodes. |