Sean,

On 26/01/2010, at 11:01 AM, Sean Coyne wrote:
> For certain setups the checkAncestorExists method is run many many
> times per request and therefore there are many hits to the database.
> Over time there are more and more records in this table, so each time
> the query is run many records are returned.

The table essentially stores information about view caching.  If you are not 
caching views (and we all should be) then its probably doing a lot more work 
than is needed.

> For example:
> 
> I am looking at a request right now that returned over 150k rows from
> the database.  The 30 slowest queries were all requests to the
> dmWebskinAncestor table and they returned over 3000 records on each
> query.
> 
> Can this table safely be truncated periodically?

This table can be truncated as needed.


> Does FarCry core manage it itself?

It should be managing this table.  If its not then we ought to put something in 
place to do so.  May be possible to truncate this table on App initialisation.


> It seems to me that the table would query much faster if there were
> fewer rows.
> 
> Also perhaps the methods in dmWebskinAncestor should be refactored to
> return only a single row.  The checkAncestorExists, for example, only
> needs one row to return true.  Why return all the rows if they aren't
> needed?

Aye that doesn't sound too healthy.  What version of FarCry are you running?

-- geoff
http://www.daemon.com.au/

-- 
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry

Reply via email to