Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John A Meinel <john(at)arbash-meinel(dot)com>
Cc: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, Arjen van der Meijden <acmmailing(at)vulcanus(dot)its(dot)tudelft(dot)nl>, pgsql-hackers(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)
Date: 2005-04-06 23:06:34
Message-ID: 6827.1112828794@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

John A Meinel <john(at)arbash-meinel(dot)com> writes:
> Actually, I think he was saying do a nested loop, and for each item in
> the nested loop, re-evaluate if an index or a sequential scan is more
> efficient.

> I don't think postgres re-plans once it has started, though you could
> test this in a plpgsql function.

It doesn't, and in any case that's a microscopic view of the issue.
The entire shape of the plan might change depending on what we think
the selectivity is --- much more than could be handled by switching
scan types at the bottom level.

Also, I anticipate that bitmap-driven index scans will change things
considerably here. The range of usefulness of pure seqscans will
drop drastically...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2005-04-06 23:24:46 Re: Recognizing range constraints (was Re: Plan for
Previous Message John A Meinel 2005-04-06 22:54:07 Re: [HACKERS] Recognizing range constraints (was Re: Plan

Browse pgsql-performance by date

  From Date Subject
Next Message Adam Palmblad 2005-04-06 23:22:59 Tweaking a C Function I wrote
Previous Message John A Meinel 2005-04-06 22:54:07 Re: [HACKERS] Recognizing range constraints (was Re: Plan