Re: Delete large amount of records and INSERT (with indexes) - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Delete large amount of records and INSERT (with indexes)
Date
Msg-id 200304151447.h3FEl3p09572@candle.pha.pa.us
Whole thread Raw
In response to Re: Delete large amount of records and INSERT (with indexes) goes VERY slow  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
Alvaro Herrera wrote:
> On Wed, Apr 09, 2003 at 12:59:01PM -0400, Tom Lane wrote:
> > Peter Nixon <listuser@peternixon.net> writes:
> >
> > > I then reran my import script and found that I was getting approximately 1
> > > INSERT every 30 secconds!!! although SELECTS were working relatively
> > > quickly.
> >
> > I think your mistake was to do VACUUM ANALYZE while the table was empty.
> > That led the planner to generate plans suitable for a very small table
> > --- seqscans instead of indexscans, for example.
>
> But he _is_ getting good performance for SELECT, so the plans are not
> that bad.  Only insertion is slow.  Can this be related to the btree
> index bloating issue you fixed on january?

It is my understanding that we only allowed indexes to reuse space after
VACUUM, not shrink the index size during VACUUM FULL, so the index could
still be huge.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


pgsql-general by date:

Previous
From: "Johnson, Shaunn"
Date:
Subject: import fixed width files into PostgreSQL
Next
From: Oleg Bartunov
Date:
Subject: Re: Appending to an array