From: Rick Gigger <rick@alpinenetworking.com>
To: Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>
Cc: Mike Mascari <mascarm@mascari.com>
Cc: PgSQL General ML <pgsql-general@postgresql.org>
Subject: Re: performance problem
Date: Thu, 20 Nov 2003 14:12:32 -0700
Message-ID: <01c601c3afab$0445d660$0700a8c0@trogdor> (raw)
References: <1069164075.986.239.camel@bbking.uio.no>
<20031118142919.GI4953@libertyrms.info>
<1069180780.2769.91.camel@haggis.homelan>
<019301c3ae07$d714e220$0700a8c0@trogdor>
<87llqdqy37.fsf@asmodeus.mcnaught.org>
<20031118205057.K606@hermes.hilbert.loc>
<01b201c3ae14$92bd3c00$0700a8c0@trogdor>
<3FBA8911.5060805@mascari.com>
<01cc01c3ae1c$b54fa980$0700a8c0@trogdor>
<01b401c3afa8$2ba201f0$0700a8c0@trogdor>
<20031120210600.GC26865@dcc.uchile.cl>
Ah, I didn't realize that you could just do an ANALYZE. I thought there was
only VACUUM ANALYZE but that can't run inside of a transaction.
Thanks,
rg
----- Original Message -----
From: "Alvaro Herrera Munoz" <alvherre@dcc.uchile.cl>
To: "Rick Gigger" <rick@alpinenetworking.com>
Cc: "Mike Mascari" <mascarm@mascari.com>; "PgSQL General ML"
<pgsql-general@postgresql.org>
Sent: Thursday, November 20, 2003 2:06 PM
Subject: Re: [GENERAL] performance problem
On Thu, Nov 20, 2003 at 01:52:10PM -0700, Rick Gigger wrote:
> I worked around this by starting the transaction and inserting the 45,000
> rows and then killing it. The I removed the index and readded it which
> apparently gathered some stats and since there were all of the dead tuples
> in there from the failed transaction it now decided that it should use the
> index. I reran the script and this time it took 5 minutes again instead
of
> 1 1/2 hours.
Stats are not collected automatically. You should run ANALYZE after
importing your data. And it's probably faster to create the index after
the data is loaded, too.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
Y una voz del caos me habló y me dijo
"Sonríe y sé feliz, podría ser peor".
Y sonreí. Y fui feliz.
Y fue peor.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: rick@alpinenetworking.com, alvherre@dcc.uchile.cl, mascarm@mascari.com, pgsql-general@postgresql.org
Subject: Re: performance problem
In-Reply-To: <01c601c3afab$0445d660$0700a8c0@trogdor>
References: <1069164075.986.239.camel@bbking.uio.no> <20031118142919.GI4953@libertyrms.info> <1069180780.2769.91.camel@haggis.homelan> <019301c3ae07$d714e220$0700a8c0@trogdor> <87llqdqy37.fsf@asmodeus.mcnaught.org> <20031118205057.K606@hermes.hilbert.loc> <01b201c3ae14$92bd3c00$0700a8c0@trogdor> <3FBA8911.5060805@mascari.com> <01cc01c3ae1c$b54fa980$0700a8c0@trogdor> <01b401c3afa8$2ba201f0$0700a8c0@trogdor> <20031120210600.GC26865@dcc.uchile.cl> <01c601c3afab$0445d660$0700a8c0@trogdor>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox