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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-performance by date

  From Date Subject
Next Message Stefan Keller 2012-02-28 08:30:44 Re: 回复: [PERFORM] PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Previous Message Mark Hills 2012-02-27 23:13:57 Re: Index condition in a Nested Loop