Robert Haas <> 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:

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.

The other problem is how to recognize a query as being a candidate for
one-shot optimization, but I guess exec_simple_query (as opposed to the
v3 protocol) applies.

Dimitri Fontaine     PostgreSQL : Expertise, Formation et Support

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to