In MySQL, will a SELECT from an indexed column alway result in sorted outputl?
-
If I issue a SELECT in mysql like: SELECT c1 FROM t1; and if c1 is indexed using a B-Tree index, then will my output essentially be equivalent to: SELECT c1 FROM t1 ORDER BY c1; Are there conditions for this to happen?
-
Answer:
If mysql has truly implemented SQL, the answer should be no. In SQL, the purpose of an index is to speedup the where clause providing that its expression can be logically speeded up using the index and to speedup the sorting as specified by the order by clause.
goglucho... at Yahoo! Answers Visit the source
Other answers
i think it will return sorted value couse query read data from first index of table.
akira
Related Q & A:
- How does MySQL reindex a table?Best solution by Stack Overflow
- Will a fuel filler pipe from a 1998 or 1996 Mercury Tracer fit onto a 1997 Mercury Tracer?Best solution by Yahoo! Answers
- Will a current job appear on a background check if I do not put it on a resume/application?Best solution by eeoc.gov
- Will a new DSi with firmware 1.4U will work with the AceKard 2i?Best solution by Yahoo! Answers
- How much will a upgrade to a iPhone 4 on a family plan cost?Best solution by ChaCha
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.