Re: view selection during query rewrite

2020-05-14 Thread Tom Lane
Vamsi Meduri writes: > Suppose I have the following query and a view v1 defined as follows: > *Q1: SELECT * FROM Table1 WHERE Table1.col1 = 5 and Table1.col2 LIKE > '%abc%';* > *create view v1 as select * from Table1 where Table1.col1 = 5;* > An effective way to execute Q1 would be to re-write it

view selection during query rewrite

2020-05-14 Thread Vamsi Meduri
Suppose I have the following query and a view v1 defined as follows: *Q1: SELECT * FROM Table1 WHERE Table1.col1 = 5 and Table1.col2 LIKE '%abc%';* *create view v1 as select * from Table1 where Table1.col1 = 5;* An effective way to execute Q1 would be to re-write it as: *select * from v1 where col