Hi,

I warn you this is a very very strange problem.
A problem of slowness with one of my indexes. Let me explain.

I have a table users with about 100,000 entries.


There is a field state, that is a int(4) and that has 3 different values.
There is an index on this field.


The following request runs in about 1 second (!)
Code:
SELECT id
FROM users
WHERE state > '0'
ORDER BY id DESC 
LIMIT 1

I have another field birthyear that is a int(11) with no index on it.

The following request (almost the same with a nex condition) runs in less than 0.001 second (!)
Code:
SELECT id
FROM users
WHERE birthyear > '1980'
ORDER BY id DESC 
LIMIT 1

I told you, this is strange ...