On Wed, 23 Feb 2000 14:45:23 Szokoli Gabor wrote: >I'm talking to two people at the same time here, trying to cut down on my >traffic. OK, I'll answer for me (Stuart) and let Eddie handle the others...
> <snip> >I get Eddie's originial point: records could be saved one after another, >in the order they arrive, and that would keep things ordered properly, >so there would be no need for an ORDER BY in the query, and everyone would >be content. >With a sophisticated SQL DB, we get the same results, but a piece of >information is lost, that would allow major optimalisations, even if the >table is indexed properly (I'm not completely familiar with SQL terms >here) the DB will find out at each and every INSERT by hard work, that >"heck, this new reckord goes after the last one, and not in between >somewhere!" >But we knew it all the time, and if we could say in SQL "this table will >be loaded in the order the index wants it", we could save the trouble. >I mean, the results would be the same of course, but it would take less >time. Everything you say is true; however (as far as I know) putting something in a table in an RDBMS is like putting something in a Tcl array - you have no control of what "location" in the array your data is saved in. I would assume this is because some kind of hashing algorithm is used in each case.
Presumably if the data is already in sorted order when you put the record in the table, that will speed up the process of indexing it. But you'll still need an ORDER BY clause when you retrieve it (just as you might need to sort elements of a Tcl array when you retrieve them) otherwise you're not guaranteed the order of retrieval.
>I'm showing my lack of experience again: >is SQL*Loader a DBvendor independent way to load a table from a file? Yes, it is an Oracle utility. There may be similar utilities for other RDBMSs.
Cheers Stuart Austin
--== Sent via Deja.com http://www.deja.com/ ==-- Share what you know. Learn what you don't. -- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <email@example.com>. !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.
This archive was generated by hypermail 2b29 : Mon Jan 08 2001 - 15:27:37 MET