MySQL Forums
Forum List  »  Newbie

Re: How does group by algorithm works?
Posted by: Rick James
Date: June 12, 2009 09:12AM

In the original case, the data will be scanned in some order, probably the order it happens to exist in the data file. Or it might be scanned in the order of some other index it happens to use. After DELETE/UPDATE/REPLACE, the order in the data file becomes even more jumbled, hence less predictable.

The above discussion is for MyISAM tables. For InnoDB tables, the order will probably be the PRIMARY KEY order.

Bottom line -- don't trust the order unless you have an explicit ORDER BY.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.