Re: insertion times ..

From: "Bryan White" <bryan(at)arcamax(dot)com>
To: "Anand Raman" <araman(at)india-today(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: insertion times ..
Date: 2000-11-29 15:11:26
Message-ID: 002c01c05a16$a510dce0$2dd260d1@arcamax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I am trying to create a search facility for our site using udm search..
> While reading about udm search along with postgresql i cam across this
> line in one of the mailing list archived mails.
>
> ****************************************
> > I don't know what kind of queries are executed during the indexing, if
> > the insertions don't need indexes you could try to drop the index and
> > recreate them when the indexing is done.
>
> THIS SHOULD SIGNIFICANTLY INCREASE INDEXING TIME.
> ****************************************
>
> Is it true that creating indexes after the insertion has been done takes
> more time..
> If so why ..

Creating indexes will obviouly take longer on a populated table then an
empty table. However the total time for insert then index will be less then
the time to index then insert.

Note that the COPY command (as used in dump/reload) is faster than INSERT.

If you must use INSERT then group the inserts in a transaction. This will
speed it up. I don't know if there is a problem with huge numbers of
INSERTs in a single transaction. I would create a separate transaction for
every few hundred records.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-29 15:50:00 Re: Access restriction
Previous Message Phil Steinke 2000-11-29 14:45:21 plpgsql variable trouble