Re: LIKE CLAUSE on VIEWS

2023-01-22 Thread Jeff Janes
On Sun, Jan 22, 2023 at 6:34 AM aditya desai wrote: > Hi, > Is there any way to improve performance of LIKE clause on VIEWS. > > select * From request_vw where upper(status) like '%CAPTURED%' - 28 > seconds. > You would need to have an expression index over upper(status) to support such a

Re: LIKE CLAUSE on VIEWS

2023-01-22 Thread Rick Otten
> > > On Sun, 22 Jan 2023 at 13:34, aditya desai wrote: > >> Hi, >> Is there any way to improve performance of LIKE clause on VIEWS. >> >> select * From request_vw where upper(status) like '%CAPTURED%' - 28 >> seconds. >> >> select * from request_vw where status='CAPTURED' >> >> Application team

Re: LIKE CLAUSE on VIEWS

2023-01-22 Thread Samed YILDIRIM
Hi Aditya, If you share your view's query and the query you run against the view, it would help all of us to understand better. pg_trgm would be the life saver option for you, of course if you created it on the right column, with the right expression, and by using the right indexing method. It