RE: Time to insert

Поиск
Список
Период
Сортировка
От Albertson, Chris
Тема RE: Time to insert
Дата
Msg-id 71EFB3F67FADD3119C0A00508B5544419661F5@mailtest123.com
обсуждение исходный текст
Ответ на Time to insert  (Renaud Thonnart <thonnart@amwdb.u-strasbg.fr>)
Список pgsql-general
The fastest way to add many records is to drop the
indexes and then use copy., then rebuild the idexes.
Yes I know it's not pretty.

You can in fact use VACUUM from C/C++.  Use fork/exec
to start a shell that runs vaccum.  Takes abut six or
eight lines of code.

> -----Original Message-----
> From: Renaud Thonnart [mailto:thonnart@amwdb.u-strasbg.fr]
> Sent: Thursday, May 03, 2001 3:50 AM
> To: Einar Karttunen
> Cc: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Time to insert
>
>
> It is a little difficult to perform VACUUM analyse because
> I'm writing an
> application in C++ using libpq++.
> I Use version 7.0.3
> I try COPY too but result was about the same.
>
> Renaud.
>
>
> Einar Karttunen wrote:
>
> > On Thu, 3 May 2001, Renaud Thonnart wrote:
> >
> > > Hi everyone
> > > Could someone explain me why time of insertion become
> that long when
> > > table increase ?
> > > For the same kind of insertion:
> > > When table is empty : 0.03s/row
> > > Table has 3663 rows : 2.07s/row
> > > Is that normal ?
> > >
> > > Sincerely, Renaud THONNART
> > >
> > Have you performed a VACUUM [ANALYZE]? If you are inserting
> data in larger
> > patches consider using copy or dropping indexes. What
> version of pgsql are
> > you using? There used to be (if I remember correctly) a bug
> in 7.1 betas
> > that made the inserts slow down.
> >
> > - Einar Karttunen
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

В списке pgsql-general по дате отправления:

Предыдущее
От: teg@redhat.com (Trond Eivind Glomsrød)
Дата:
Сообщение: Re: troubles with postgresql 7.0.2
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Database in RAM