public inbox for [email protected]
help / color / mirror / Atom feedFrom: Adam Brusselback <[email protected]>
To: [email protected]
Subject: Re: Slow update on column that is part of exclusion constraint
Date: Wed, 13 Apr 2016 13:14:29 -0400
Message-ID: <CAMjNa7e6XeyAue0XEi=Pnc8rRp5qK6RvnTg69woTGTG6zw9rcQ@mail.gmail.com> (raw)
In-Reply-To: <CAMjNa7ck5JZxooWUsZ_ag71HA=GB_zKzpMOgaFO0Z5+YfEerOA@mail.gmail.com>
References: <CAMjNa7ck5JZxooWUsZ_ag71HA=GB_zKzpMOgaFO0Z5+YfEerOA@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
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 rows=0 loops=1)'
' -> Nested Loop (cost=32.45..644.83 rows=1 width=157) (actual
time=29329.608..29329.608 rows=0 loops=1)'
' -> HashAggregate (cost=32.04..34.35 rows=231 width=52) (actual
time=1.137..2.090 rows=231 loops=1)'
' Group Key: pti.product_id, pti.company_id, pti.date_range'
' -> Seq Scan on _prices_to_insert pti (cost=0.00..30.31
rows=231 width=52) (actual time=0.060..0.678 rows=231 loops=1)'
' -> Index Scan using
price_generated_company_product_date_active_excl on price_generated
(cost=0.41..2.63 rows=1 width=151) (actual time=126.949..126.949 rows=0
loops=231)'
' Index Cond: (date_range = pti.date_range)'
' Filter: ((upper(active_range) IS NULL) AND (pti.product_id =
product_id) AND (pti.company_id = company_id))'
' Rows Removed by Filter: 29460'
'Planning time: 3.134 ms'
'Execution time: 29406.717 ms'
reply
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: [email protected]
Cc: [email protected]
Subject: Re: Slow update on column that is part of exclusion constraint
In-Reply-To: <CAMjNa7e6XeyAue0XEi=Pnc8rRp5qK6RvnTg69woTGTG6zw9rcQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox