FYI...
Yes, I created a new field called 'd_now' with data inserted as
(TO_DAYS(NOW()), updated it to include the proper date format for all
the old records and of course then had to paste in the old timestamp
values that automatically updated when I did that update... lots of fun
on 2800 records.
Just a wild guess. If you are only using TO_DAYS(somedate) for the
queries, why don't you create the column 'adate' as INT and index it?
When you need the real DATE, use the FROM_DAYS() function.
Just a wild guess that I think could improve your queries speed.
Adolfo
On Sat, 2002-12-21 at 17:50,
Instead of:
TO_DAYS(adate) >= TO_DAYS(NOW()) - 6
you can try:
adate >= unix_timestamp(now()) - 6 * 24 * 3600
This way, you don't need to apply a function to 'adate'.
You should also note that these expressions are not exactly
equivalent since yours compares day numbers but mine compares
seconds.
I
OK.. no takers the first time... I'll try to give more/better
information..
I am running into a system wall here. I have at the moment about 2600
rows of data totaling 650K. I expect this to grow at a rate of about an
additional 1200-1500 rows per week. I am using PHP to format the returns
into we