Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DD9AE1337B97 for ; Fri, 18 Mar 2011 11:05:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 90453-07 for ; Fri, 18 Mar 2011 14:05:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay-6.dlfw.twtelecom.net (relay-6.dlfw.twtelecom.net [216.136.82.72]) by mail.postgresql.org (Postfix) with ESMTP id 77248133655C for ; Fri, 18 Mar 2011 11:05:50 -0300 (ADT) Received: from localhost (unknown [127.0.0.1]) by relay-6.dlfw.twtelecom.net (Postfix) with ESMTP id E16D6798169 for ; Fri, 18 Mar 2011 08:05:47 -0600 (MDT) X-Virus-Scanned: amavisd-new at twtelecom.net Received: from relay-6.dlfw.twtelecom.net ([127.0.0.1]) by localhost (relay-6.dlfw.twtelecom.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n0j5s8RcbWU9 for ; Fri, 18 Mar 2011 08:05:45 -0600 (MDT) Received: from mailblocker.ateb.com (unknown [97.65.140.200]) by relay-6.dlfw.twtelecom.net (Postfix) with ESMTP id 90EE079812D for ; Fri, 18 Mar 2011 08:05:45 -0600 (MDT) X-IronPort-AV: E=Sophos;i="4.63,205,1299474000"; d="scan'208";a="7763145" Received: from unknown (HELO sr002-2k3exc.ateb.com) ([172.16.48.228]) by mailblocker.ateb.com with SMTP; 18 Mar 2011 10:05:45 -0400 Received: from [172.16.48.87] ([172.16.48.87] RDNS failed) by sr002-2k3exc.ateb.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 18 Mar 2011 10:05:45 -0400 Message-ID: <4D8366AD.70001@ateb.com> Date: Fri, 18 Mar 2011 10:05:33 -0400 From: Reid Thompson Reply-To: Reid.Thompson@ateb.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Help with Query Tuning References: <4D807F42.7000906@orkash.com> <20110316163653.GF11541@aart.is.rice.edu> <4D81A951.7030609@orkash.com> <4874ad87076c4b2c743083543cae2334.squirrel@sq.gransy.com> <4D81D9BF.8030402@orkash.com> <443b5cf42d93187ae72efaa54159d401.squirrel@sq.gransy.com> <4D81F2AA.9010706@orkash.com> <6caac0fce0f9956128e08d99ad839c0e.squirrel@sq.gransy.com> <4D81FDCA.9020308@orkash.com> <9033de88e9c4f443c9e88aa027530b73.squirrel@sq.gransy.com> <4D82DCE2.5020902@orkash.com> In-Reply-To: <4D82DCE2.5020902@orkash.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Mar 2011 14:05:45.0085 (UTC) FILETIME=[93073AD0:01CBE575] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201103/214 X-Sequence-Number: 42893 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('english',content) @@ to_tsquery('english','Mujahid' || ' | ' > pdc_uima(# || 'jihad' || ' | ' || 'Militant' || ' | ' || 'fedayeen' || ' | ' > pdc_uima(# || 'insurgent' || ' | ' || 'terrORist' || ' | ' || 'cadre' || ' | ' > pdc_uima(# || 'civilians' || ' | ' || 'police' || ' | ' || 'cops' || 'crpf' || ' | ' > pdc_uima(# || 'defence' || ' | ' || 'dsf' || ' | ' || 'ssb' ); > > count > -------- > 137193 > (1 row) > > Time: 195441.894 ms what is the type/content for column publishing_date? based on what you show above, I assume it's text? -- if so, whats the format of the date string?