Hi Paul

Earlier in the year I had looked at creating a summary table that recorded how 
many impressions each client received each day but when I timed my script to 
summarise just one day (with recording of impressions being turned off for 
this) I found that if I wanted to summarise each day back to the beginning of 
the website it was going to mean something rediculous like 40 days of 
continously running the script.

It is a MyISAM table so changing it to a InnoDB does have a lot of merit. If I 
stopped all activity on the table and then changed it to InnoDB do you have any 
idea how long the change over process would take. The table has 6 fields 
(varchar 255 the biggest) and a bit over 20 million rows.

Regards
Greg



--- On Thu, 17/9/09, Paul Bennett <[email protected]> wrote:

> From: Paul Bennett <[email protected]>
> Subject: [phpug] Re: [OT] Large Database Table Problems
> To: [email protected]
> Date: Thursday, 17 September, 2009, 3:49 PM
> Hi Greg,
> 
> This may be rubbish, but you could ruin a cron process
> (perhaps daily) to:
> 
> create table newstats as select * from livestats;
> then create the indexes
> then have the clients query the newstats table (moving the
> load away from your live table)
> 
> 
> 
> You may also want to look at what table types you're
> using (MyISAM uses table level locking by default)
> 
> http://www.sitepoint.com/blogs/2009/09/08/free-performance-with-mysql-table-types/
> 
> 
> Paul
> 
> 
> > 
> 
> 
> 


      

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to