Make sure to check your queries using EXPLAIN
So l ike
EXPLAIN SELECT * FROM clicks WHERE foo = 'foo' AND bar = 'bar'
This will help you optimize your indexes and find bottlenecks. Avoid using "OR" in your queries as that generates a temporary table IIRC and will buttfuck you when the table gets too large.
|