Comment 19 for bug 590708

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The status <> 1 shouldn't cause a table scan... it would probably be a bitmap scan if it were done directly on a table rather than an intermediate result. In any case it doesn't seem to be where the cost is.

The planner goes horribly wrong in estimating the number of PackageBuilds it needs to take into account: it expects about 500 and gets about 28K. The subquery Danilo suggests would fix that, I guess. BTW that version still contains a redundant join to a second PackageBuild instance. Getting rid of that may speed things up further.