From: | Andrew - Supernews <andrew+nonews(at)supernews(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #1552: massive performance hit between 7.4 and 8.0.1 |
Date: | 2005-03-23 19:46:50 |
Message-ID: | slrnd43hta.rhd.andrew+nonews@trinity.supernews.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-performance |
On 2005-03-23, Keith Browne <tuxedo(at)deepsky(dot)com> wrote:
> One other thing which puzzled me: as a test, I tried modifying our
> script to spit out raw SQL statements instead of connecting to the
> database and performing the inserts itself. Normally, our script
> populates two tables in one pass, and then populates the third and
> fourth tables in a second pass. I massaged the SQL by hand to group the
> inserts together by table, so that the first table would be entirely
> populated, then the second, etc. When I ran this SQL script by piping
> it straight into psql, it finished in about four minutes.
Changing the order so that the referenced table is fully populated, or at
least populated with more than a handful of pages of rows, before doing
_any_ insert on a referencing table in the same session will avoid the
misplan of the FK trigger queries, because when the first insert happens
on a referencing table, there will be no reason for the planner to prefer
a sequential scan. So this result is not surprising at all.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
From | Date | Subject | |
---|---|---|---|
Next Message | Roy Badami | 2005-03-23 19:56:32 | Re: BUG #1518: Conversions to (undocumented) SQL year-month and |
Previous Message | Keith Browne | 2005-03-23 19:22:07 | Re: BUG #1552: massive performance hit between 7.4 and 8.0.1 |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-23 20:12:43 | Re: BUG #1552: massive performance hit between 7.4 and 8.0.1 |
Previous Message | Keith Browne | 2005-03-23 19:22:07 | Re: BUG #1552: massive performance hit between 7.4 and 8.0.1 |