Re: Columns correlation and adaptive query optimization - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: Columns correlation and adaptive query optimization
Date
Msg-id f4d38220-db92-ea17-2a92-5f3aed93247e@postgrespro.ru
Whole thread Raw
In response to Re: Columns correlation and adaptive query optimization  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Columns correlation and adaptive query optimization
List pgsql-hackers
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


Attachment

pgsql-hackers by date:

Previous
From: Hans Buschmann
Date:
Subject: Missing constant propagation in planner on hash quals causes joinslowdown
Next
From: Justin Pryzby
Date:
Subject: Re: v12.0: reindex CONCURRENTLY: lock ShareUpdateExclusiveLock onobject 14185/39327/0 is already held