<pre> mysql> select max(dh.maxtid),max(d.tiden) from heaptest dh,diary d; +---------------------+---------------------+ | max(dh.maxtid) | max(d.tiden) | +---------------------+---------------------+ | 2002-04-02 13:01:52 | 2002-04-02 13:01:52 | +---------------------+---------------------+ 1 row in set (53.42 sec) mysql> select max(tiden) from diary; +---------------------+ | max(tiden) | +---------------------+ | 2002-04-02 13:01:52 | +---------------------+ 1 row in set (0.34 sec) mysql> select max(maxtid) from heaptest; +---------------------+ | max(maxtid) | +---------------------+ | 2002-04-02 13:01:52 | +---------------------+ 1 row in set (0.00 sec) mysql> </pre> take a look at the accestimes. i wonder why the first sql-query took so much longer time than the two following. the first query does exactly the same thing as the two others, but in only one query. FYI: the table "heaptest" is a temporary table (type=heap) and both tables are indexed on "tiden" respectively "maxtid". (and the table diary contains quite a lot of data). bye from [EMAIL PROTECTED]
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php