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 10390.992024622@sss.pgh.pa.us
Whole thread Raw
In response to inserting, index and no index - speed  (zilch@home.se)
Responses Re: inserting, index and no index - speed  (zilch@home.se)
List pgsql-general
zilch@home.se writes:
> I just noticed that inserting 10000 tuples in an indexed table took exactly
> the same amount of time as inserting 10000 tuples in a non-indexed table
> (194 seconds). Why is this? The difference in MySQL is about 50% longer in
> an indexed table.

Surprises me too.  Which PG version, and what are the test conditions
exactly?  (Table and index declarations; is table empty initially;
how is backend being driven, and what commands are issued exactly?
How many shared buffers, platform, etc)

Under PG 7.1, it's possible that your test caused no actual I/O except
to the WAL log ... but I'd still think that the volume of WAL I/O
would be greater when writing an index.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can not pg_dumpall
Next
From: Peter Choe
Date:
Subject: error starting postmaster