pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Planner issue on sorting joining of two tables with limit
Date: Fri, 07 May 2010 11:35:43 -0400
Message-ID: <13688.1273246543@sss.pgh.pa.us> (raw)
In-Reply-To: <4BE3EAF60200002500031399@gw.wicourts.gov>
References: <k2j2e2e4b141004251122u7adab639ve203afe7a486673f@mail.gmail.com>
	<5252.1272300692@sss.pgh.pa.us>
	<g2r2e2e4b141005030657vd6a0945fj9b9650bf515a189f@mail.gmail.com>
	<l2z2e2e4b141005052354p9bd81643j866bc5ce5af3ada5@mail.gmail.com>
	<4BE3EAF60200002500031399@gw.wicourts.gov>

"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Alexander Korotkov <aekorotkov@gmail.com> wrote:
>>> I just don't find why it is coincidence. I think that such plan
>>> will always produce result ordered by two columns, because such
>>> nested index scan always produce this result.
 
> Assuming a nested index scan, or any particular plan, is unwise. 

I think he's proposing that the planner should recognize that a plan
of this type produces a result sorted by the additional index columns.
I'm not convinced either that the sortedness property really holds,
or that it would be worth the extra planning effort to check for;
but it's not a fundamentally misguided proposal.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <13688.1273246543@sss.pgh.pa.us>
Permalink:  ../13688.1273246543@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13688.1273246543@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, Kevin.Grittner@wicourts.gov, aekorotkov@gmail.com
  Subject: Re: Planner issue on sorting joining of two tables with limit
  In-Reply-To: <13688.1273246543@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