Just for the archives: looks like I bumped into bug #21456: http://bugs.mysql.com/bug.php?id=21456
This bug has been fixed in 4.1.22 and 5.0.25, so I'll just have to upgrade. Thanks anyway Markus Markus Hoenicka <[EMAIL PROTECTED]> was heard to say: > Chris <[EMAIL PROTECTED]> was heard to say: > > > > That is, if MySQL can't use an index to sort the result, DISTINCT > > > queries won't be sorted at all. > > > > That doesn't make sense. > > > > How many rows fit that criteria? > > > > SELECT COUNT(DISTINCT t_refdb.refdb_id) FROM t_refdb WHERE > refdb_type!='DUMMY' > AND t_refdb.refdb_id>0; > => 784 > > SELECT COUNT(DISTINCT t_refdb.refdb_id) FROM t_refdb WHERE > t_refdb.refdb_id>0; > => 784 > > In this case refdb_type does not further restrict the result set. However, > I've > tried queries where a modified clause further restricts the results selected > by > refdb_id with the same effect regarding the sorting. > > BTW the above results were obtained with > > mysql.exe Ver 14.7 Distrib 4.1.10, for Win95/Win98 (i32) > > so the problem is neither specific to the FreeBSD port nor to a particular > 4.1.x > version. > > regards, > Markus > > > -- > Markus Hoenicka > [EMAIL PROTECTED] > (Spam-protected email: replace the quadrupeds with "mhoenicka") > http://www.mhoenicka.de > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]