Re: Optimizing Postgresql ILIKE while query

2018-10-23 Thread Scottix
Also leading wildcards can inhibit the use of indexes. Best to try to avoid LIKE queries similar to '%TERM' On Mon, Oct 22, 2018 at 12:23 AM Alban Hertroys wrote: > > > > On 22 Oct 2018, at 7:56, aman gupta wrote: > > > > Issue: > > > > We have the base table which contains 22M records and we

Re: Optimizing Postgresql ILIKE while query

2018-10-22 Thread Alban Hertroys
> On 22 Oct 2018, at 7:56, aman gupta wrote: > > Issue: > > We have the base table which contains 22M records and we created a view on > top of it while querying the view with ILIKE clause it took 44 seconds and > with LIKE Clause 20 Seconds > > Query: > > fm_db_custom_db=# EXPLAIN

Re: Optimizing Postgresql ILIKE while query

2018-10-22 Thread Pavel Stehule
Hi po 22. 10. 2018 v 7:57 odesílatel aman gupta napsal: > Hi Team, > > Greetings for the day!! > > Platform: > > PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 > 20150623 (Red Hat 4.8.5-11), 64-bit > > > Issue: > > > We have the base table which contains 22M records and we

Optimizing Postgresql ILIKE while query

2018-10-21 Thread aman gupta
Hi Team, Greetings for the day!! Platform: PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit Issue: We have the base table which contains 22M records and we created a view on top of it while querying the view with ILIKE clause it took