On Thu, Mar 13, 2014 at 11:37 AM, Stephan Beal <sgb...@googlemail.com> wrote:
> Hi, all,
>
> i know this is probably splitting hairs, and i ask only out of curiosity,
> not because i'm looking to optimize at this level...
>
> Given a Fossil repository db (namely the event.mtime value, a Julian Day),
> which of the following is faster for finding the min/max value of that
> field:
>
> SELECT MIN(mtime) FROM event;
>
> or:
>
> SELECT mtime FROM event ORDER BY mtime LIMIT 1;

WIBNI regardless of which form is faster, the engine would detect and
rewrite the slower into the other ?

Note: Which is faster might depend on if we have an index on the mtime
field or not.

-- 
Andreas Kupries
Senior Tcl Developer
Code to Cloud: Smarter, Safer, Faster(tm)
F: 778.786.1133
andre...@activestate.com
http://www.activestate.com
Learn about Stackato for Private PaaS: http://www.activestate.com/stackato

EuroTcl'2014, July 12-13, Munich, GER
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to