Re: Query performs badly with materialize node - Mailing list pgsql-general

From Tom Lane
Subject Re: Query performs badly with materialize node
Date
Msg-id 17038.1316444469@sss.pgh.pa.us
Whole thread Raw
In response to Query performs badly with materialize node  (Ingmar Brouns <swingi@gmail.com>)
Responses Re: Query performs badly with materialize node
List pgsql-general
Ingmar Brouns <swingi@gmail.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

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: How to pass array from .pgc to sql function
Next
From: David Johnston
Date:
Subject: Re: General guidance if there is an in dadabase solution or should stay as excel vba solution.