One for all you MySQL experts :-)
I have the following query:
SELECT o.*, p.name, p.amount, p.quantity
FROM orders o, products p
WHERE o.id = p.order_i
I'm not MySQL expert (more SQL Server) by I think you'd better have index on o.timestamp and you need to rewrite your query like this
o.timestamp >= '2012-01-01' and o.timestamp <= '2012-01-31' + INTERVAL 1 DAY
The logic is - index will not work if you compare some expression on column and constants. You need to compare column and constants