Ingmar Brouns <swingi@xxxxxxxxx> writes: > What I find strange is that there is a conditionless index scan on > participates, retrieving all its rows, and then a nested loop over all those > rows and a materialize node. Yeah, that indexscan looks pretty odd to me too, but it's likely explained by the context that you didn't provide. The indexscan might have been chosen because it provides output that's pre-sorted in the order required by some higher-level part of the plan. Or maybe you've disabled seqscans, or done some other fooling with the planner cost parameters. There is certainly no way that a condition-free indexscan will look cheaper than a seqscan with anything close to the default cost settings. In short: if you want to get useful commentary on your problem, you need to provide a more complete picture. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general