From: Martijn Tonies Date: August 15 2007 8:42pm Subject: Re: Recreate Table With Sorted Data List-Archive: http://lists.mysql.com/mysql/208599 Message-Id: <042f01c7df7c$c60c92c0$9902a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > > >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