From: Игорь Выскорко [mailto:vyskorko.igor@yandex.ru] Sent: Tuesday, November 26, 2019 4:13 AM To: Andrei Zhidenkov <andrei.zhidenkov@n26.com> Cc: pgsql-general@lists.postgresql.org Subject: Re: Weird seqscan node plan
Look at 8th row: this nested loop decided to join the second node by using seqscan (1st plan) when index is available (2nd plan). Index scan is much cheaper (0.430 over 257.760).
What am I missing?
And thanks for any reply!
Hm... about 12 tables. I tried to disable geqo (set geqo = off;) plan didn't change. But thanks for your try )
Version I'm using (if matter): select version();
PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit
Try increasing the following parameters to 14 (or even 16, if you are not sure about number of tables involved):