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

Re: Index condition in a Nested Loop

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Hills <mark(at)pogo(dot)org(dot)uk>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Index condition in a Nested Loop
Date: 2012-02-28 00:16:56
Message-ID: 22245.1330388216@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Mark Hills <mark(at)pogo(dot)org(dot)uk> writes:
> I hadn't realised that sub-queries restrict the planner so much. Although 
> at some point I've picked up a habit of avoiding them, presumably for this 
> reason.

> If you have time to explain, I'd be interested in a suggestion for any 
> change to the planner that could make a small contribution towards 
> improving this. eg. a small project that could get me into the planner 
> code.

Well, if it were easy to do, we'd probably have done it already ...

Plain subqueries might perhaps be turned into joins (with special join
types no doubt), but I'm not sure what we'd do about subqueries with
grouping or aggregation, as your examples had.  There was some talk a
month or three back about allowing such subqueries to have parameterized
paths a la the recently-added parameterized path mechanism, but it
didn't get further than idle speculation.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Stefan KellerDate: 2012-02-28 08:30:44
Subject: Re: 回复: [PERFORM] PG as in-memory db? How to w?==?UTF-8?Q?arm up and re-populate buffers? How to read in all tuples in?==?UTF-8?Q?to memory?
Previous:From: Mark HillsDate: 2012-02-27 23:13:57
Subject: Re: Index condition in a Nested Loop

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