Re: sql statement not using all primary key values and poor performance

2024-02-22 Thread James Pang
Hi experts, we have a SQL from Postgresql JDBC, primary key is based on (bigint,varchar2,bigint), but from sql plan, it convert to ::numeric so the plan just use one "varchar" key column and use the other 2 bigint keys as filters. what's the cause about that ?

sql statement not using all primary key values and poor performance

2024-02-22 Thread James Pang
Hi experts, we have a SQL from Postgresql JDBC, primary is based on (bigint,varchar2,bigint), but from sql plan, it convert to ::numeric so the plan just use one "varchar" key column and use the other 2 bigint keys as filters. what's the cause about that ? Table