From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
---|---|
To: | "Marshall, Steve" <smarshall(at)wsi(dot)com> |
Cc: | "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Allow use of immutable functions operating onconstants with constraint exclusion |
Date: | 2007-05-11 17:50:59 |
Message-ID: | 1178905859.10861.382.camel@silverbirch.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 2007-05-08 at 08:08 -0400, Marshall, Steve wrote:
> I think the optimization could work if you could exclude prepared
> statements. However, I looked at the planning code and found no clear
> way to distinguish between a statement being prepared for later
> execution, and a statement being planned only for immediate execution.
> As a result, I don't think stable functions can (or should) be
> expanded to help optimize queries using constraint exclusion.
I think it should be possible to tell the difference between planned and
immediate-execution queries. Anything coming thru exec_simple_query can
be tagged as immediate-execution, so should be allowed to make the
evaulation of stable functions in the planner as being accurate for the
rest of the statement execution also.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-11 18:27:49 | Re: [PATCHES] Arrays of Complex Types |
Previous Message | Gregory Stark | 2007-05-11 15:55:10 | Concurrent psql patch |