pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John A Meinel <john@arbash-meinel.com>
Cc: Jim C. Nasby <decibel@decibel.org>
Cc: Arjen van der Meijden <acmmailing@vulcanus.its.tudelft.nl>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)
Date: Wed, 06 Apr 2005 19:06:34 -0400
Message-ID: <6827.1112828794@sss.pgh.pa.us> (raw)
In-Reply-To: <4254688F.6070009@arbash-meinel.com>
References: <425413D3.5030304@vulcanus.its.tudelft.nl>
	<28552.1112809334@sss.pgh.pa.us>
	<425423A9.9000504@vulcanus.its.tudelft.nl>
	<5999.1112820690@sss.pgh.pa.us>
	<6326.1112825377@sss.pgh.pa.us>
	<20050406222536.GL93835@decibel.org>
	<6594.1112826910@sss.pgh.pa.us>
	<4254688F.6070009@arbash-meinel.com>

John A Meinel <john@arbash-meinel.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



view thread (12+ messages)  latest in thread

Message-ID: <6827.1112828794@sss.pgh.pa.us>
Permalink:  ../6827.1112828794@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6827.1112828794@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, john@arbash-meinel.com, decibel@decibel.org, acmmailing@vulcanus.its.tudelft.nl, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Recognizing range constraints (was Re: Plan for relatively simple query seems to be very inefficient)
  In-Reply-To: <6827.1112828794@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox