RE: Which index is used in the index scan.

2018-10-29 Thread Sakai, Teppei
Hi, Andreas Thank you your reply. This problem was solved. I revalidated your advice, source code and the statistics. As a result, the cost was changing due to the difference in the index height. Regards, SAKAI Teppei > On 17 October 2018 07:39:48 CEST, "Sakai, Teppei" > wrote: > >Hi > > > >We

Re: Which index is used in the index scan.

2018-10-16 Thread Andreas Kretschmer
On 17 October 2018 07:39:48 CEST, "Sakai, Teppei" wrote: >Hi > >We have question about index scan. > >We created table and indexes and executed SQL, but the index used by >day is different. >One day the index of c1 was used, and on another day the index of c2 >was used. > - CREATE TABLE tbl1 (c1

Which index is used in the index scan.

2018-10-16 Thread Sakai, Teppei
Hi We have question about index scan. We created table and indexes and executed SQL, but the index used by day is different. One day the index of c1 was used, and on another day the index of c2 was used. - CREATE TABLE tbl1 (c1 varchar, c2 varchar, c3 timestamptz); - CREATE INDEX tbl1_idx_c1 O