pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: maxim.boguk@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT
Date: Thu, 15 Apr 2021 13:17:44 -0400
Message-ID: <3794038.1618507064@sss.pgh.pa.us> (raw)
In-Reply-To: <16964-5dd796d85c4846cd@postgresql.org>
References: <16964-5dd796d85c4846cd@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> I found that combination of EXCLUDE CONSTRAINT with intarray GIST have
> quadratic degradation with relation size.

Hm, I couldn't reproduce any such problem using this data set:

regression=# create table test (team_id int, user_ids int[]);
CREATE TABLE
regression=# insert into test select i, array[i*2,i*2+1] from generate_series(1,4096) i;
INSERT 0 4096
regression=# create extension btree_gist ;
CREATE EXTENSION
regression=# create extension intarray ;
CREATE EXTENSION
Time: 19.077 ms
regression=# ALTER TABLE test
ADD CONSTRAINT unique_user_parties_on_team
      EXCLUDE USING gist (
        team_id WITH =,
        user_ids WITH &&
      );
ALTER TABLE
Time: 459.005 ms
regression=# insert into test  values (10, array[1,2]);
INSERT 0 1
Time: 1.086 ms

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <3794038.1618507064@sss.pgh.pa.us>
Permalink:  ../3794038.1618507064@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3794038.1618507064@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, maxim.boguk@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT
  In-Reply-To: <3794038.1618507064@sss.pgh.pa.us>

* 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