Skip site navigation (1) Skip section navigation (2)

Re: dynamic SQL - possible performance regression in 9.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dong Ye" <yed(at)vmware(dot)com>
Cc: "'Heikki Linnakangas'" <hlinnakangas(at)vmware(dot)com>, "'Peter Eisentraut'" <peter_e(at)gmx(dot)net>, "'Pavel Stehule'" <pavel(dot)stehule(at)gmail(dot)com>, "'PostgreSQL Hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: dynamic SQL - possible performance regression in 9.2
Date: 2013-01-04 19:39:55
Message-ID: 23909.1357328395@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
"Dong Ye" <yed(at)vmware(dot)com> writes:
> I did three back-to-back runs using the same settings as in
> http://archives.postgresql.org/pgsql-performance/2012-11/msg00007.php
> Except:
> - use no prepared statement
> - use 40 db connections
> - build source from postgresql.git on the server box using: REL9_1_7,
> REL9_2_2, REL9_2_2 + this patch

> NOTPM results:
> REL9_1_7: 46512.66
> REL9_2_2: 42828.66
> REL9_2_2 + this patch: 46973.70

Thanks!  I think this is probably sufficient evidence to conclude that
we should apply this patch, at least in HEAD.  Whatever Peter is seeing
must be some other issue, which we can address whenever we understand
what it is.

Next question is what people think about back-patching into 9.2 so as
to eliminate the performance regression vs 9.1.  I believe this would
be safe (although some care would have to be taken to put the added
boolean fields into places where they'd not result in an ABI break).
However it may not be worth the risk.  The 40% slowdown seen with
Pavel's example seems to me to be an extreme corner case --- Dong's
result of 8% slowdown is probably more realistic for normal uses
of SPI_execute.  Might be better to just live with it in 9.2.
Thoughts?

			regards, tom lane


In response to

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2013-01-04 19:50:55
Subject: Re: dynamic SQL - possible performance regression in 9.2
Previous:From: Dong YeDate: 2013-01-04 18:53:32
Subject: Re: dynamic SQL - possible performance regression in 9.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group