Re: BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT
Дата
Msg-id 3794038.1618507064@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT  (Maxim Boguk <maxim.boguk@gmail.com>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16965: Select query fails with ERROR: XX000: could not find pathkey item to sort
Следующее
От: Maxim Boguk
Дата:
Сообщение: Re: BUG #16964: Quadratic performance degradation of INSERT and ADD CONSTRAINT for intarray/GIST EXCLUDE CONSTRAINT