List:General Discussion« Previous MessageNext Message »
From:Peter Skipworth Date:March 26 2001 11:20am
Subject:Any ideas on how to optimise this ?
View as plain text  
Hi peeps,

I've got a table which is basically a log of traffic on one of my websites
- I have a seperate table per month, all of which are MERGED for queries
which need access to more than a month's worth of data. 

select count(distinct cookie) as c,dayofmonth(event_time) as d from
tbl_webevents where event_time >= '2001-02-01 00:00:00' and
event_time < '2001-03-01 00:00:00' group by d;

This query currently takes in excess of 20 seconds to return a result
(tbl_webevents is the merge table, consisting of 6 x 250,000 row table).

Does anyone have any suggestions as to whether this could be sped up ? All
ideas welcome!

Thanks,

P


Thread
Any ideas on how to optimise this ?Peter Skipworth26 Mar
  • Re: Any ideas on how to optimise this ?Fred van Engen26 Mar
    • Re: Any ideas on how to optimise this ?Peter Skipworth26 Mar
      • Re: Any ideas on how to optimise this ?Fred van Engen26 Mar
        • Re: Any ideas on how to optimise this ?Peter Skipworth26 Mar
          • Re: Any ideas on how to optimise this ?Fred van Engen26 Mar
            • Re: Any ideas on how to optimise this ?Peter Skipworth26 Mar