From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: why do we need two snapshots per query? |
Date: | 2011-11-11 21:53:12 |
Message-ID: | CA+U5nMKr06-kjMvQmSZpfn6aQ7+mk2iRZ1gvFJyiPLFd-aHe8g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 11, 2011 at 7:21 PM, Dimitri Fontaine
<dimitri(at)2ndquadrant(dot)fr> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Considering that GetSnapshotData() is the number-one consumer of CPU
>> time on many profiling runs I've done, this seems needlessly
>> inefficient. Can't we arrange to retain the snapshot used for parse
>> analysis / planning and reuse it for the portal that we create just
>> afterwards? Off the top of my head, I'm not exactly sure how to do
>> that cleanly, but it seems like it should work.
>
> Please refer to this thread:
>
> http://postgresql.1045698.n5.nabble.com/One-Shot-Plans-td4488820.html
>
> It seems one of the more prominent drawback of Simon's approach to
> one-shot plans then was which snapshot it's running against, so your
> proposal to optimize one-shot plan by enforcing the use of a single
> snapshot looks like a step forward here.
Agreed, its essentially the same thing.
If execution immediately follows planning we should recognise it and
do something about it.
Tom, in that earlier thread you said you'd be doing something in this
release about that. Can you say more about what that was, and will you
be doing it still?
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2011-11-11 22:02:00 | Re: foreign key locks, 2nd attempt |
Previous Message | Tom Lane | 2011-11-11 21:41:49 | Re: Working with git repo tagged versions |