Select count(*) order by count(*) and Index ?

2004-06-24 Thread Lars Jankowfsky
Heyho folks, Is there any chance that mySQL uses an index and not filesort if I do the following : "select count(*)as cnt from table where ... group by id having cnt(*) > 2 order by cnt" The Problem here is the "order by" clause - everything else is easy and clear ( and fast ) but as soon as I

order by count

2002-01-09 Thread Thibaut Allender
y" doesn't affect the record set), but keep this order... sort of "order by count(field_to_count grouped)" is this possible ? thanks PS : i'm using mysql 3.23 -- .thibaut allender ~ dev:network. @ magic:sq. .tel. : +32 2