From: Pierre C <lists@peufeu.com>
To: Mladen Gogala <mladen.gogala@vmsinfo.com>
To: Mario Splivalo <mario.splivalo@megafon.hr>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: SELECT INTO large FKyed table is slow
Date: Wed, 01 Dec 2010 01:51:33 +0100
Message-ID: <op.vm0fb7z4eorkce@apollo13> (raw)
In-Reply-To: <4CF59017.1090705@megafon.hr>
References: <4CF24103.8030209@megafon.hr>
<4CF5259C.8000306@vmsinfo.com>
<4CF59017.1090705@megafon.hr>
> Now I tried removing the constraints from the history table (including
> the PK) and the inserts were fast. After few 'rounds' of inserts I added
> constraints back, and several round after that were fast again. But then
> all the same. Insert of some 11k rows took 4 seconds (with all
> constraints) and now the last one of only 4k rows took one minute. I did
> vacuum after each insert.
>
>
> Mario
Hm, so for each line of drones_history you insert, you also update the
correspoding drones table to reflect the latest data, right ?
How many times is the same row in "drones" updated ? ie, if you insert N
rows in drones_nistory, how may drone_id's do you have ?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@peufeu.com, mladen.gogala@vmsinfo.com, mario.splivalo@megafon.hr
Subject: Re: SELECT INTO large FKyed table is slow
In-Reply-To: <op.vm0fb7z4eorkce@apollo13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox