Re: Re: Planner chooses slow index heap scan despite accurate row estimates - Mailing list pgsql-performance

From Tom Lane
Subject Re: Re: Planner chooses slow index heap scan despite accurate row estimates
Date
Msg-id 30303.1464394568@sss.pgh.pa.us
Whole thread Raw
In response to Re: Planner chooses slow index heap scan despite accurate row estimates  (Jake Magner <jakemagner90@gmail.com>)
Responses Re: Planner chooses slow index heap scan despite accurate row estimates
List pgsql-performance
Jake Magner <jakemagner90@gmail.com> writes:
> I tried without doing an INSERT at all, just running the SELECT queries and
> the result is the same. Nested loop is chosen but is much slower.

FWIW, I just noticed that the comparisons you're using are plain equality
of the arrays.  While a GIN array index supports that, it's not exactly
its strong suit: the sort of questions that index type supports well are
more like "which arrays contain value X?".  I wonder if it'd be worth
creating btree indexes on the array column.

            regards, tom lane


pgsql-performance by date:

Previous
From: Jake Magner
Date:
Subject: Re: Planner chooses slow index heap scan despite accurate row estimates
Next
From: Jake Magner
Date:
Subject: Re: Planner chooses slow index heap scan despite accurate row estimates