Question

I am seeing odd behaviour with using Doctrine::getTable() and running queries using it.

In some cases there is little to no overhead and in othercases there is 200+ms of overhead when the Doctrine::getTable() is first called (although little overhead for subsequent calls to the same table).

The action works like this.

a. DoctrineTable is called to run a query (the table in question was used to generate the action module files) with little to no overhead on table A b. Form is saved c. DoctrineTable is called to run a query on an unrelated table (table B) and has considerable overhead (200+ms) d. DoctrineTable is called on another table (table C) to run another query with little to no overhead

I've tried the action with the DoctrineTable query in step c removed to see if it was general loading issue but the query in step d still runs with little or no overhead. I've run the queries using Doctrine_Query directly in the action to see if that made the difference and the speed impact is still there.

It doesn't matter what the query on the problem table is, the same overhead/performance penalty is there.

The only difference with the slow table (table B) is that it has the versionable behaviour where as the other tables (table A and table C don't). Could that be impacting the speed of the initial query (subsequent queries to that table are fast once the first one is done)?

Was it helpful?

Solution

So after more digging and testing I can confirm that Versionable behaviour on tables adds to the overhead when running queries (and inserts) on that table.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top