List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:August 18 2009 8:57pm
Subject:Re: Query Question
View as plain text  

> It may be true that "some DBMSs" physically store rows in whatever order 
> you
> speicfy;

That's not what I said.

>however, this is a MySQL list, and MySQL does not do this (InnoDB
> anyway).
>
> For example, take a table with 10,000,000 rows and run a simple select on
> it:
>
> Database changed
> mysql> SELECT id FROM trans_item LIMIT 1\G
> *************************** 1. row ***************************
> id: 8919552
> 1 row in set (0.08 sec)
> mysql> SELECT id FROM trans_item ORDER BY id ASC LIMIT 1\G
> *************************** 1. row ***************************
> id: 8441275
> 1 row in set (0.08 sec)
>
> Sure, the first query may always return that ID number; however, it may 
> not.

And you're confusing -physical order- (table order) with -result set order- 
...

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com


Thread
Query QuestionBill Arbuckle18 Aug
  • Re: Query QuestionWalter Heck - OlinData.com18 Aug
    • RE: Query QuestionGavin Towey18 Aug
  • Re: Query QuestionMartijn Tonies18 Aug
    • Re: Query QuestionJohnny Withers18 Aug
  • Re: Query QuestionMartijn Tonies18 Aug