Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPaOy-0005Oq-V0 for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Apr 2013 15:24:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UPaOy-0007PG-Fr for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Apr 2013 15:24:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPaOx-0007PB-UU for pgsql-bugs@postgresql.org; Tue, 09 Apr 2013 15:24:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPaOv-00069d-5A for pgsql-bugs@postgresql.org; Tue, 09 Apr 2013 15:24:03 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r39FNxZA001700; Tue, 9 Apr 2013 11:23:59 -0400 (EDT) From: Tom Lane To: luigisag@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8048: Text Search In-reply-to: References: Comments: In-reply-to luigisag@gmail.com message dated "Tue, 09 Apr 2013 09:47:17 -0000" Date: Tue, 09 Apr 2013 11:23:59 -0400 Message-ID: <1699.1365521039@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org luigisag@gmail.com writes: > CREATE TABLE "User_Full_Text_Search_2" ( > "Email" varchar(50), > "UserId" varchar(50), > "Full_Text_Search" varchar(4096), > "tsv" varchar(4096) > ) > WITH (OIDS=FALSE) > ; You declared tsv as a plain varchar column, not a tsvector, so text searches on it aren't optimized. I'm surprised the system even let you build a GIN index on it --- maybe you have btree_gin installed? Anyway that index isn't useful for answering a full-text-search query, as you'll see if you compare EXPLAIN results. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs