Sam,
Tuesday, March 05, 2002, 6:16:17 PM, you wrote:

SL> I have a table like so :

SL> CREATE TABLE album_rank(
SL>         album_id INT NOT NULL,
SL>         rank INT NOT NULL,
SL>         KEY(album_id)
SL> )

SL> I want to query on the album_id & get the results ordered by rank but I 
SL> want to avoid doing an ORDER BY in the query because of the filesort 
SL> that it usually triggers so I pre-ordered the rows in my table by 
SL> inserting them in the order I wanted with a CREATE TABLE ordered 
SL> SELECT * FROM unordered ORDER BY album_id, rank ASC.

SL> For some reason I get the data back in a different order. I've tried 
SL> ORDER BY album_id,rank ASC & DESC in case it's a FILO or FIFO.

SL> Is there some way that I can avoid doing an ORDER BY and get my
SL> rows back ordered by album_id, rank they way I inserted them ?

Regularly no. The order of entries in tables changes during the work.




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to