Re: Incorrect index used in few cases..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: AminPG Jaffer <aminjaffer(dot)pg(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Incorrect index used in few cases..
Date: 2019-06-18 13:35:08
Message-ID: 802.1560864908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

AminPG Jaffer <aminjaffer(dot)pg(at)gmail(dot)com> writes:
> Is there an explanation why it is using incorrect index?

> SQL:
> SELECT count(*) FROM tc WHERE ((tc.a_id = $1)) AND ((tc.m_id = $2)) AND
> ((tc.ag_id is not null)) AND ((tc.id in ($3))) AND ((tc.pt in ($4, $5, $6)))

What data types are these columns? For that matter, could we see the
whole schema for the table (psql \d+ output or equivalent)?

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message AminPG Jaffer 2019-06-18 18:55:47 Re: Incorrect index used in few cases..
Previous Message AminPG Jaffer 2019-06-18 13:11:54 Incorrect index used in few cases..