Greetings,

While waiting for the repair table reactions I thought to ask a question that hogged in my head for a while.

I have a db which has among others (including text fields) a timestamp field and a counter field.

I want to make statistics from them, doing sum()s with conditions 'timestamp>P1 and timestamp<P2' 'timestamp>P2 and timestamp<P3' and so on.

A trivial way would be to make a cycle for Pn but that takes a lot of time and as one search takes considerable time (10-20sec for 100-200MB db), this multiplies to a huge overall time.

Any ideas how to solve this with possibly one db pass ?

Thanks
Bgs


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to