Skip site navigation (1) Skip section navigation (2)

Re: Planner issue on sorting joining of two tables with limit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Alexander Korotkov" <aekorotkov(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Planner issue on sorting joining of two tables with limit
Date: 2010-05-07 15:35:43
Message-ID: 13688.1273246543@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Alexander Korotkov <aekorotkov(at)gmail(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Josh BerkusDate: 2010-05-07 17:48:30
Subject: Re: partioning tips?
Previous:From: Kevin GrittnerDate: 2010-05-07 15:27:02
Subject: Re: Planner issue on sorting joining of two tables with limit

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group