I've been doing some investigation and I'm going to narrow this bug right down - getting rid of all the joins still gives us a 10-12 second (under lsprof) parse time for a 3000 row result set. I'm attaching the kcachegrind which shows this pretty clearly.
To reproduce, grab lp db-stable/devel - and do a query for Specifications which returns 3000 of them; for some reason thats really quite slow - 4ms each or thereabouts.
I've been doing some investigation and I'm going to narrow this bug right down - getting rid of all the joins still gives us a 10-12 second (under lsprof) parse time for a 3000 row result set. I'm attaching the kcachegrind which shows this pretty clearly.
To reproduce, grab lp db-stable/devel - and do a query for Specifications which returns 3000 of them; for some reason thats really quite slow - 4ms each or thereabouts.