List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:August 15 2007 8:42pm
Subject:Re: Recreate Table With Sorted Data
View as plain text  


> > >Question 2: If not, what would the Insert/Select statement look like
that
> > would copy the records over in sorted order?
> >
> >
> > Tables aren't sorted. Period.
> >
> >
> >
> > Only result-sets can be sorted.
>
> While that is true, strictly speaking, packing data into the same
> physical order as you expect to logically access it is a fairly common
> optimization for data which remains fairly static.  Having said that,
> for the 1600 records reffered to here, I doubt there would be any
> observable difference.

As with what Dan said, this is _only_ useful if you can get the engine
to fetch the data in storage order. If not, there's no point.

And when do you actually get this data in "storage order"? Probably
only when doing a fetch on this single table from beginning to end.

And as both of you said: 1600 rows? What's the hassle.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

Thread
Recreate Table With Sorted DataJohn Kebbel15 Aug
  • Re: Recreate Table With Sorted DataWm Mussatto15 Aug
  • Re: Recreate Table With Sorted DataMartijn Tonies15 Aug
    • Re: Recreate Table With Sorted DataDan Nelson15 Aug
    • Re: Recreate Table With Sorted DataMichael Dykman15 Aug
  • Re: Recreate Table With Sorted DataMartijn Tonies15 Aug
Re: Recreate Table With Sorted DataJohn Kebbel15 Aug
  • Re: Recreate Table With Sorted DataMartijn Tonies16 Aug
  • Re: Recreate Table With Sorted DataChris Boget16 Aug
Re: Recreate Table With Sorted DataJohn Kebbel18 Aug