Re: Question on Insert / Update

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Question on Insert / Update
Дата
Msg-id 1131550580.8979.14.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на Re: Question on Insert / Update  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Список pgsql-general
Quote from the link below:

"Tip:  A block containing an EXCEPTION clause is significantly more
expensive to enter and exit than a block without one. Therefore, don't
use EXCEPTION without need."

I would think this places an automatic save-point at the begin of the
block. I doubt this would give the best performance for the given
problem...

Cheers,
Csaba.

On Wed, 2005-11-09 at 16:20, A. Kretschmer wrote:
> am  10.11.2005, um  1:45:46 +1100 mailte Alex folgendes:
> > Hi,
> > have just a general question...
> >
> > I have a table of 10M records, unique key on 5 fields.
> > I need to update/insert 200k records in one go.
> >
> > I could do a select to check for existence and then either insert or
> > update.
> > Or simply insert, check on the error code an update if required.
>
> Take a look at
> http://developer.postgresql.org/docs/postgres/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
>
>
>
> HTH, Andreas


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

Предыдущее
От: Ian Harding
Дата:
Сообщение: psql scripts
Следующее
От: "Cristian Prieto"
Дата:
Сообщение: Re: [HACKERS] Troubles with array_ref