MySQL Forums
Forum List  »  Optimizer & Parser

Re: Is the query order guaranteed using Btree indexes and no ORDER BY
Posted by: Ted Johnson
Date: May 29, 2019 04:41PM

Not surprised that the SQL standard states that. However in this example:

1. Rows are INSERTed into the two tables in the order of the index definitions.

2. Indexes are Btrees.

3. Tables contain millions of rows.

4. MySQL(or any database technology) is in a position to return the rows from a join of the two tables ordered by the index definitions and thereby not require an expensive ORDER BY sort given points 1 and 2 above.

Anyone know if the MySQL optimizer does this?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Is the query order guaranteed using Btree indexes and no ORDER BY
560
May 29, 2019 04:41PM


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.