Hi there,

I have a user table, containing a column on gender. Type is tinyint(1) and 1
is male 2 is female. No index. 50000 entries

This statement:
SELECT sex, count(*) AS c
FROM user GROUP BY sex

takes 1.5 s to execute

I am wondering if ti wuold be possible to find this out any faster ?

SELECT count(*) AS c
FROM .user
where sex = 1

takes about half the time :-)

So maybe some of you guys do have some experiance on that. This is just way
to long.

I appreciate every help on that,

Thanx in advance, Andy



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to