Re: Columns correlation and adaptive query optimization
Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
From: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: pgsql-hackers@postgresql.org
Date: 2019-10-18T16:53:23Z
Lists: pgsql-hackers
Attachments
- auto_explain_create_statistics.patch (text/x-patch) patch
- join_selectivity-2.patch (text/x-patch) patch
Smarter version of join selectivity patch handling cases like this: explain select * from outer_tab join inner_tab using(x,y) where x=1; QUERY PLAN ------------------------------------------------------------------------------------------------ Nested Loop (cost=0.42..1815.47 rows=10 width=12) Join Filter: (outer_tab.y = inner_tab.y) -> Seq Scan on outer_tab (cost=0.00..1791.00 rows=1 width=12) Filter: (x = 1) -> Index Only Scan using inner_tab_x_y_idx on inner_tab (cost=0.42..24.35 rows=10 width=8) Index Cond: (x = 1) (6 rows) -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian Postgres Company