Re: Re: Planner chooses slow index heap scan despite accurate row estimates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jake Magner <jakemagner90(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Re: Planner chooses slow index heap scan despite accurate row estimates
Date: 2016-05-28 00:16:08
Message-ID: 30303.1464394568@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jake Magner <jakemagner90(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jake Magner 2016-05-29 00:38:33 Re: Planner chooses slow index heap scan despite accurate row estimates
Previous Message Jake Magner 2016-05-27 23:30:54 Re: Planner chooses slow index heap scan despite accurate row estimates