Re: Query performs badly with materialize node

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ingmar Brouns <swingi(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query performs badly with materialize node
Date: 2011-09-19 15:01:09
Message-ID: 17038.1316444469@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ingmar Brouns <swingi(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2011-09-19 15:05:00 Re: General guidance if there is an in dadabase solution or should stay as excel vba solution.
Previous Message Merlin Moncure 2011-09-19 14:57:39 Re: How to pass array from .pgc to sql function