Re: Insert Performance - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: Insert Performance
Date
Msg-id 004901c264ef$6baaeb40$4201a8c0@beeblebrox
Whole thread Raw
In response to Re: Improving speed of copy  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Responses Re: Insert Performance
Re: Insert Performance
List pgsql-hackers
Update:

> vacuum full; vacuum analyze;
> select bench_invoice(1000); select bench_invoice(1000); ... (10 times)
>
> It seems performance is degrading with every insert!
> Here is the result (time in seconds in bench_invoice(), commit between
> selects just under a second)
>
> 13, 24, 36, 47, 58, 70, 84, 94, 105, 117, ... (seconds per 1000 rows
> inserted)
>
> Isn't that odd?
> I have tried again. vacuum analyze alone (without full) is enough to lower
> times again. They will start again with 13 seconds.

Tested further what exactly will reset insert times to lowest possible:

vacuum full; helps
vacuum analyze; helps
analyze <tablename>; of table that I insert to doesn't help!
analyze <tablename>; of any table reference in foreign key constraints
doesn't help!

Only vacuum will reset the insert times to the lowest possible!
What does the vacuum code do?? :-]

Regards,
Michael Paesold



pgsql-hackers by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: Insert Performance
Next
From: Gavin Sherry
Date:
Subject: Re: Insert Performance