Re: Incorrect index used in few cases..

2019-06-26 Thread AminPG Jaffer
code where it goes through the execution plans when SQL is sent i can try to go through the code to see if can figure out what it is doing behind to scene in it's calculation? On Sun, Jun 23, 2019 at 8:07 AM AminPG Jaffer wrote: > > Sorry for late reply. > > The initial values

Re: Incorrect index used in few cases..

2019-06-23 Thread AminPG Jaffer
Sorry for late reply. The initial values before upgrade for seq_page_cost=1, random_page_cost=4 and after upgrading when we started to see the issues as we were seeing "Seq Scan" we change them seq_page_cost=1, random_page_cost=1 The issue happens only in production so making the index invalid w

Re: Incorrect index used in few cases..

2019-06-18 Thread AminPG Jaffer
tid" btree (a_id, id) "i_tc_advertiser_id" btree (a_id) "i_tc_campaign_id" btree (c_id) "i_tc_lud_agi" btree (last_updated_date, ag_id) "i_tc_uniqueness_hash_v2" btree (uniqueness_hash_v2) Check constraints: "tc_secondary" CH

Incorrect index used in few cases..

2019-06-18 Thread AminPG Jaffer
Hi We recently upgraded one of the instances from 9.6.3 to 9.6.12 and seeing following issue that occurs for few cases. I have tried running analyze on the table with different values from 1000 - 5000 but it doesn't seem to help the issue. There is some skew in a_id but the combination index