Re: [PERFORM] Slow update on column that is part of exclusion constraint

2016-04-13 Thread Adam Brusselback
So fair enough, it does seem to be related to the lookup rather than maintenance on the index. I was misguided in my initial assumption. Spent quite a bit of time trying to come up with a self contained test, and it seems like I can't make it choose the GiST index unless I remove the regular btree

Re: [PERFORM] Slow update on column that is part of exclusion constraint

2016-04-13 Thread Evgeniy Shishkin
> On 13 Apr 2016, at 20:14, Adam Brusselback wrote: > > Sorry, brain stopped working and I forgot to include the normal info. > > Postgres version: 9.5.1 > Hardware: 2 core, 4gb Digital Ocean virtual server > OS: Debian > > explain analyze for an example update: > 'Update on price_generated

Re: [PERFORM] Slow update on column that is part of exclusion constraint

2016-04-13 Thread Adam Brusselback
Sorry, brain stopped working and I forgot to include the normal info. Postgres version: 9.5.1 Hardware: 2 core, 4gb Digital Ocean virtual server OS: Debian explain analyze for an example update: 'Update on price_generated (cost=32.45..644.83 rows=1 width=157) (actual time=29329.614..29329.614 ro

[PERFORM] Slow update on column that is part of exclusion constraint

2016-04-13 Thread Adam Brusselback
Hey all, been running into some performance issues with one of my tables, and it seems to be centered around index maintenance. I have a table to store aggregated prices that are derived from sale data over a configurable period, and a function that runs periodically that inserts new prices if nec