Re: Re: inserting, index and no index - speed - Mailing list pgsql-general

From Alex Pilosov
Subject Re: Re: inserting, index and no index - speed
Date
Msg-id Pine.BSO.4.10.10106102252310.17529-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: inserting, index and no index - speed  (Vivek Khera <khera@kcilink.com>)
Responses Re: Re: inserting, index and no index - speed
List pgsql-general
On 10 Jun 2001, Vivek Khera wrote:

> >>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> TL> Everything is always a transaction in Postgres.  If you don't say
> TL> begin/end, then there's an implicit begin and end around each individual
> TL> query.  So your first set of tests were paying transaction commit
> TL> overhead for each insert.
>
> This doesn't seem to hold exactly for INSERTs involving sequences as
> default values.  Even if the insert fails for some other constraint,
> the sequence is incremented.
No, that's exactly how it is supposed to work, to guarantee that you will
never get same value from two separate calls to nextval.

-alex


pgsql-general by date:

Previous
From: "Fred J"
Date:
Subject: problem with me or postgres ?
Next
From: Vivek Khera
Date:
Subject: Re: Re: inserting, index and no index - speed