Re: SELECT INTO large FKyed table is slow

From: "Pierre C" <lists(at)peufeu(dot)com>
To: "Mladen Gogala" <mladen(dot)gogala(at)vmsinfo(dot)com>, "Mario Splivalo" <mario(dot)splivalo(at)megafon(dot)hr>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: SELECT INTO large FKyed table is slow
Date: 2010-12-01 00:51:33
Message-ID: op.vm0fb7z4eorkce@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


> 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 ?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message bricklen 2010-12-01 01:32:16 Re: Question about subselect/IN performance
Previous Message Mario Splivalo 2010-12-01 00:00:23 Re: SELECT INTO large FKyed table is slow