> Planning time: 2.953 ms > Execution time: 2084537.882 ms > > Problem with estimation of selectivity > -> Seq Scan on area a (cost=0.00..265.70 rows=1 width=106) (actual > time=0.669..1.756 rows=23 loops=1) >
Filter: ((path)::text ~~ '%.1806.%'::text) > leads to very dangerous idea to perform nested loop with very heavy parallel > plan inside. >
Is it because you have not performed Analyze on the 'area' or is it something else due to which there is such a deviation in estimation?
Hi,
I don't think there is good way estimate selectivity of
Filter: ((path)::text ~~ '%.1806.%'::text)
But problem that there huge difference in real plan cost with exactly 1 row vs 2 or more rows estimated. Problem still exists without parallel plan involved, where is leads to 23 seq scan over table with 100M rows :(.