hi
i just noticed something strange & i couldn't figure any reason out for it. i have 3 table each one has about 1 million record. every record in every one of tables have a timestamp field, none of them are index.
i wrote a query like this:
Code:
SELECT COUNT(*)AS num, '0' AS row, '0' AS col
FROM t0, t1, t2
WHERE 1=1
AND t0.id = t1.id
AND t1.id = t2.id
AND t2.timestamp BETWEEN 'x' AND 'y'
GROUP BY '0', '0'
it's response time in phpMyAdmin is something around 2.5 sec, but when i change timestamp part to "AND t1.timestamp BETWEEN 'x' AND 'y'" (timestamp in t1 or in t0) response time goes up to 22 second!
i insist there isn't index on timestamp field.
any idea what's the reason for this huge response time difference?