Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-02 Thread Marc Mamin
AlexK987 alex.cue@gmail.com writes: I've created a GIN index on an INT[] column, but it slows down the selects. Here is my table: create table talent(person_id INT NOT NULL, skills INT[] NOT NULL); insert into talent(person_id, skills) select generate_series, array[0, 1] ||

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-02 Thread Marc Mamin
AlexK987 alex.cue@gmail.com writes: I've created a GIN index on an INT[] column, but it slows down the selects. Here is my table: create table talent(person_id INT NOT NULL, skills INT[] NOT NULL); insert into talent(person_id, skills) select generate_series, array[0, 1] ||

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-01 Thread Tom Lane
AlexK987 alex.cue@gmail.com writes: I've created a GIN index on an INT[] column, but it slows down the selects. Here is my table: create table talent(person_id INT NOT NULL, skills INT[] NOT NULL); insert into talent(person_id, skills) select generate_series, array[0, 1] ||

[PERFORM] Why is GIN index slowing down my query?

2015-02-01 Thread AlexK987
I've created a GIN index on an INT[] column, but it slows down the selects. Here is my table: create table talent(person_id INT NOT NULL, skills INT[] NOT NULL); insert into talent(person_id, skills) select generate_series, array[0, 1] || generate_series from generate_series(3, 1048575); create

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-01 Thread Tom Lane
AlexK987 alex.cue@gmail.com writes: This is a realistic case: everyone have Python and Java skills, but PostGis and Haskell and Closure are rare. If we are looking for a person that has all the skills required for a task (array[1, 15]), that is skills @ array[1, 15] and not the opposite,

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-01 Thread AlexK987
Tom, Oops, you were absolutely right: I needed to use @ instead of @. Thanks again! -- View this message in context: http://postgresql.nabble.com/Why-is-GIN-index-slowing-down-my-query-tp5836319p5836327.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. -- Sent

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-01 Thread AlexK987
Tom, This is a realistic case: everyone have Python and Java skills, but PostGis and Haskell and Closure are rare. If we are looking for a person that has all the skills required for a task (array[1, 15]), that is skills @ array[1, 15] and not the opposite, right? Also can you explain why