List:Internals« Previous MessageNext Message »
From:Timothy Smith Date:September 5 2001 11:10pm
Subject:Re: ORDER BY ... DESC LIMIT 1 optimization ?
View as plain text  
On 2001 Sep 05, Fournier Jocelyn [Presence-PC] <joc@stripped> wrote:
> Won't it be possible the MySQL parser optimize the SELECT y FROM x ORDER BY
> z DESC LIMIT 1 as :

MySQL 4.0 already has optimized this type of query.  I don't
think your solution would be general enough, but it is a good
work around for the time being if you are using MySQL 3.23.

Tim

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Tim Smith <tim@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-time Developer
/_/  /_/\_, /___/\___\_\___/   Boone, NC  USA
       <___/   www.mysql.com
Thread
ORDER BY ... DESC LIMIT 1 optimization ?Fournier Jocelyn [Presence-PC]5 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Timothy Smith6 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Fournier Jocelyn [Presence-PC]6 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Fournier Jocelyn [Presence-PC]6 Sep
  • ORDER BY ... DESC LIMIT 1 optimization ?Michael Widenius6 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Paul Cadach6 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Fournier Jocelyn [Presence-PC]6 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Paul Cadach6 Sep
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Fournier Jocelyn [Presence-PC]6 Sep
    • Re: ORDER BY ... DESC LIMIT 1 optimization ?Timothy Smith6 Sep
      • Re: ORDER BY ... DESC LIMIT 1 optimization ?Michael Widenius6 Sep
      • Re: ORDER BY ... DESC LIMIT 1 optimization ?Michael Widenius16 Jan
  • Re: ORDER BY ... DESC LIMIT 1 optimization ?Paul Cadach6 Sep