Re: SELECT INTO large FKyed table is slow - Mailing list pgsql-performance

From Pierre C
Subject Re: SELECT INTO large FKyed table is slow
Date
Msg-id op.vm0fb7z4eorkce@apollo13
Whole thread Raw
In response to Re: SELECT INTO large FKyed table is slow  (Mario Splivalo <mario.splivalo@megafon.hr>)
Responses Re: SELECT INTO large FKyed table is slow
List 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 ?

pgsql-performance by date:

Previous
From: Mario Splivalo
Date:
Subject: Re: SELECT INTO large FKyed table is slow
Next
From: bricklen
Date:
Subject: Re: Question about subselect/IN performance