I've got a very large table in a mysql database (several million rows). Each row has a date it's been created as a field. I would like to extract rows from 2011 until today. the query I'm using looks something like this:
select data1, data1, data3, data4, data5, data6
from db.table
where date(data3) between '2011-10-01' and '2012-08-06'
I get to about 3 million rows fetched in mySQL Query Browser before the browser crashes and i get a Glib error (gmem.c:173 failed to allocate 50080000 bytes. aborting.)
Is it simply because I don't have enough memory? Are there any tricks or performance enhancing queries anyone can suggest?