pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jarda.urik@gmail.com
To: pgsql-bugs@postgresql.org
Cc: jarda.urik@gmail.com
Subject: BUG #14949: array_append() - performance issues (in update)
Date: Wed, 06 Dec 2017 10:50:00 +0000
Message-ID: <20171206105000.21691.37546@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      14949
Logged by:          Jaroslav Urik
Email address:      jarda.urik@gmail.com
PostgreSQL version: 10.1
Operating system:   Ubuntu server 16.04
Description:        

Hello, 
I am having (time) issues with UPDATE of Array of INTEGERs:

Update eg:
UPDATE id_mng.id_pair SET segment = array_append(segment,7) WHERE
project_guid = '...' AND id_p IN ( SELECT... )


Table definition:
CREATE TABLE id_mng.id_pair
(
  project_guid character varying NOT NULL,
  id_p character varying NOT NULL,
  type_p integer NOT NULL,
  segment integer[],
  ...
  CONSTRAINT id_pair_pkey PRIMARY KEY (project_guid, id_p, type_p)
)

That inner select return at about  3 sec, but the UPDATE as a whole runs for
minutes (I stopped it after 10mins). On my other system with postgres 9.5.10
with identical data, it finishes after 15sec.

Please advise

Thank you 

Jaroslav Urik



view thread (4+ messages)  latest in thread

Message-ID: <20171206105000.21691.37546@wrigleys.postgresql.org>
Permalink:  ../20171206105000.21691.37546@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20171206105000.21691.37546@wrigleys.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: jarda.urik@gmail.com
  Subject: Re: BUG #14949: array_append() - performance issues (in update)
  In-Reply-To: <20171206105000.21691.37546@wrigleys.postgresql.org>
  References: <20171206105000.21691.37546@wrigleys.postgresql.org>

* 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