From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_stat_statements fingerprinting logic and ArrayExpr |
Date: | 2013-12-11 01:37:34 |
Message-ID: | 15759.1386725854@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Tue, Dec 10, 2013 at 3:08 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm wondering whether this doesn't indicate that we need to rethink where
>> the fingerprinter has been plugged in. I'm not sure that somewhere in
>> the planner, post-constant-folding, would be a better place; but it's
>> worth thinking about.
> ... if you're not talking about blaming plans and not queries, you
> must be talking about making the planner do the constant folding in a
> way that facilitates tools like pg_stat_statements in getting the
> "essential nature" of the query (*not* the plan) post constant
> folding.
Yeah; if we were going to take this seriously, we'd need to do some
refactoring to separate normalization-type activities from other
planning activities. I'm not sure it's worth the trouble. Right
now, for instance, eval_const_expressions() also handles inlining
of SQL functions, which is a behavior we'd almost certainly *not*
want in front of query fingerprinting. But it's hard to see how
we disentangle that without either lost optimization capacity
or duplicative processing. A significant fraction of the point of
const-folding is to exploit opportunities revealed by inlining.
Anyway, I'm not volunteering to do this ;-) ... just idly speculating
about whether it'd be worth doing.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2013-12-11 01:40:04 | Re: Get more from indices. |
Previous Message | Sergey E. Koposov | 2013-12-11 01:27:04 | Re: ANALYZE sampling is too good |