MySQL Forums
Forum List  »  Optimizer & Parser

Re: Query using "ref" instead of "range" access
Posted by: Rick James
Date: July 11, 2009 09:57PM

Is the stored procedure faster or slower?

See if this works any faster:
SELECT SQL_NO_CACHE scores.lid, scores.score,
   ( SELECT COUNT(s2.score)+1
          FROM scores AS s2
          WHERE s2.lid=scores.lid
            AND s2.score>scores.score )
    FROM scores
    WHERE scores.pid=186359
   GROUP BY scores.lid;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Query using "ref" instead of "range" access
2022
July 11, 2009 09:57PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.