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

From Tom Lane
Subject Re: inserting, index and no index - speed
Date
Msg-id 23582.992212872@sss.pgh.pa.us
Whole thread Raw
In response to Re: inserting, index and no index - speed  (zilch@home.se)
List pgsql-general
zilch@home.se writes:
> I can't believe what a difference that made. How can it make it faster by
> putting it in a transaction? I thought that would make it slower. Like only
> a 100th of the time.

Everything is always a transaction in Postgres.  If you don't say
begin/end, then there's an implicit begin and end around each individual
query.  So your first set of tests were paying transaction commit
overhead for each insert.

            regards, tom lane

pgsql-general by date:

Previous
From: zilch@home.se
Date:
Subject: Re: inserting, index and no index - speed
Next
From: "Miguel Angel Heredia"
Date:
Subject: Greetings, Thinking about converting