Re: [PERFORM] Query plan change with multiple elements in IN clause

2013-08-30 Thread Tom Lane
Mathieu De Zutter writes: > The problem is that this join is performing very badly when more than one > work is involved. It chooses a plan that is orders of magnitude slower. > I have attached > - The (simplified) table definitions > - The (simplified) view > - Two queries with explain analyze p

[PERFORM] Query plan change with multiple elements in IN clause

2013-08-30 Thread Mathieu De Zutter
Hi all, I'm migrating a web application to an ORM framework (Doctrine) so I need a new way to get statistics about entities into the application without importing all data, only the results (e.g. load total number of children instead of loading all children into the application and counting it aft