Thursday, July 26, 2012

Re: Archive old data from model's table

Dud you try
  1. $this->CakePHPModelName->setSource('table_name');

gloop


On Thursday, July 26, 2012 5:57:52 AM UTC+2, baur79 wrote:
i have high load on table "reports"

so my idea to have (to divide) 2 tables
1 - actual data
2 - archved data
with same logic and structure,

can i manupulate on fly the cakephp Model to read from another table ?
but to keep model's name as same




On Wednesday, July 25, 2012 11:59:54 PM UTC+6, Andy Gale wrote:
On Wed, Jul 25, 2012 at 6:04 PM, baur79 wrote:
> i have model "Report" with table "reports"
> it contain report of last month. (50 000 records every month)
>
> please give some suggestions

These are called "partitions". A quick Google came up with this:

https://github.com/deeeki/cakephp-partitionable

I haven't tried it but maybe this will help you.

--
Andy Gale
http://andy-gale.com
http://twitter.com/andygale

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: