Re: [PERFORM] Help with Query Tuning

2011-03-18 Thread tv
> Thanks , it works now .. :-) > > Here is the output : > > pdc_uima=# SELECT count(*) from page_content WHERE publishing_date like > '%2010%' and > pdc_uima-# content_language='en' and content is not null and > isprocessable = 1 and > pdc_uima-# to_tsvector('english',content) @@ > to_tsquery('eng

Re: [PERFORM] Help with Query Tuning

2011-03-18 Thread Reid Thompson
On 03/18/2011 12:17 AM, Adarsh Sharma wrote: Thanks , it works now ..:-) Here is the output : pdc_uima=# SELECT count(*) from page_content WHERE publishing_date like '%2010%' and pdc_uima-# content_language='en' and content is not null and isprocessable = 1 and pdc_uima-# to_tsvector('engli

Re: [PERFORM] Help with Query Tuning

2011-03-17 Thread Adarsh Sharma
Thanks , it works now .. :-) Here is the output : pdc_uima=# SELECT count(*) from page_content WHERE publishing_date like '%2010%' and pdc_uima-# content_language='en' and content is not null and isprocessable = 1 and pdc_uima-# to_tsvector('english',content) @@ to_tsquery('english','Mujahid

Re: [PERFORM] Help with Query Tuning

2011-03-17 Thread tv
> *Modified Query :- > > *SELECT count(*) from page_content > WHERE publishing_date like '%2010%' and content_language='en' and > content is not null and isprocessable = 1 and > to_tsvectOR('english',content) @@ to_tsquery('english','Mujahid' || > 'jihad' || 'Militant' || 'fedayeen' || 'insurgent'

Re: [PERFORM] Help with Query Tuning

2011-03-16 Thread Adarsh Sharma
Thanks, I understand it know :- But My one doubt which isn't clear : *Original Query :-* select count(*) from page_content where (content like '%Militant%' OR content like '%jihad%' OR content like '%Mujahid%' OR content like '%fedayeen%' OR content like '%insurgent%' OR content like '%t

Re: [PERFORM] Help with Query Tuning

2011-03-16 Thread Adarsh Sharma
Thanks Marshall, would I need to change the data type of *content *column to tsvector and create a Gist Index on it. Best Regards, Adarsh Kenneth Marshall wrote: On Wed, Mar 16, 2011 at 02:43:38PM +0530, Adarsh Sharma wrote: Dear all, I am facing a problem while creating the index to m

Re: [PERFORM] Help with Query Tuning

2011-03-16 Thread Reid Thompson
On 03/16/2011 05:13 AM, Adarsh Sharma wrote: Dear all, I am facing a problem while creating the index to make the below query run faster. My table size is near about 1065 MB and 428467 rows. explain analyze select count(*) from page_content where publishing_date like '%2010%' and content_lang

Re: [PERFORM] Help with Query Tuning

2011-03-16 Thread Kenneth Marshall
On Wed, Mar 16, 2011 at 02:43:38PM +0530, Adarsh Sharma wrote: > Dear all, > > I am facing a problem while creating the index to make the below query run > faster. My table size is near about 1065 MB and 428467 rows. > > explain analyze select count(*) from page_content where publishing_date