Re: inserting, index and no index - speed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zilch(at)home(dot)se
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: inserting, index and no index - speed
Date: 2001-06-08 18:23:42
Message-ID: 10390.992024622@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

zilch(at)home(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-08 18:25:35 Re: A join that should be very fast is taking a long time
Previous Message Tom Lane 2001-06-08 18:18:50 Re: Can not pg_dumpall