Re: brininsert optimization opportunity - Mailing list pgsql-hackers

From James Wang
Subject Re: brininsert optimization opportunity
Date
Msg-id 170315311175.2631681.12214566971840476644.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: brininsert optimization opportunity  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Responses Re: brininsert optimization opportunity
List pgsql-hackers
Hi All,  not sure how to "Specify thread msgid"  - choose one which i think is close to my new feature request.

query:

SELECT count(1) FROM table1 t1 JOIN table2 t2 ON t1.id = t2.id WHERE t1.a_indexed_col='some_value' OR
t2.a_indexed_col='some_vable';

can the server automatically replace the OR logic above with UNION please? i.e. replace it with:

(SELECT count(1) FROM table1 t1 JOIN table2 t2 ON t1.id = t2.id WHERE t1.a_indexed_col='some_value' )
UNION
(SELECT count(1) FROM table1 t1 JOIN table2 t2 ON t1.id = t2.id WHERE  t2.a_indexed_col='some_vable');

Thanks

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Track in pg_replication_slots the reason why slots conflict?
Next
From: Alexander Korotkov
Date:
Subject: Re: Postgres picks suboptimal index after building of an extended statistics