Re: Confirmation of bad query plan generated by 7.4 - Mailing list pgsql-performance

From Shaun Thomas
Subject Re: Confirmation of bad query plan generated by 7.4
Date
Msg-id 448FD794.8F27.00A9.0@leapfrogonline.com
Whole thread Raw
In response to Re: Confirmation of bad query plan generated by 7.4  ("Shaun Thomas" <sthomas@leapfrogonline.com>)
List pgsql-performance
>>> On 6/13/2006 at 9:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Read what you wrote, and rethink...

Hah.  Yes, I understand the irony of that statement, but the point is
that the value of the variable won't change during query execution.

> If you're desperate you can construct a query string with the
variable
> value embedded as a literal, and then EXECUTE that.  This isn't a
great
> solution since it forces a re-plan on every execution.

That's so gross... but it might work.  I'm not really desperate, just
frustrated.  I really can't wait until we can upgrade; 7.4 is driving
me nuts.  I'm not really worried about a re-plan, since this SP just
updates a fact table, so it only gets called twice a day.  Cutting the
execution time of the SP down to < 20 seconds from 15 minutes would be
nice, but not absolutely required.  I was just surprised at the large
difference in manual execution as opposed to the SP with the same
query.

> We've occasionally debated ways to do it better, but no such
> improvement will ever appear in 7.4 ;-)

Agreed!  When we finally upgrade, I fully plan on putting a symbolic
bullet into our old installation. ;)

Thanks!


--

Shaun Thomas
Database Administrator

Leapfrog Online
807 Greenwood Street
Evanston, IL 60201
Tel. 847-440-8253
Fax. 847-570-5750
www.leapfrogonline.com


Confidentiality Note:

The document(s) accompanying this e-mail transmission, if any, and the
e-mail transmittal message contain information from Leapfrog Online
Customer Acquisition, LLC is confidential or privileged. The information
is intended to be for the use of the individual(s) or entity(ies) named
on this e-mail transmission message. If you are not the intended
recipient, be aware that any disclosure, copying, distribution or use of
the contents of this e-mail is prohibited. If you have received this
e-mail in error, please immediately delete this e-mail and notify us by
telephone of the error

pgsql-performance by date:

Previous
From: Sven Geisler
Date:
Subject: Re: how to partition disks
Next
From: Steve Poe
Date:
Subject: Re: Which processor runs better for Postgresql?