X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 344B33A3CA4 for ; Tue, 16 Nov 2004 16:18:07 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86567-10 for ; Tue, 16 Nov 2004 16:18:01 +0000 (GMT) Received: from ra.sai.msu.su (ra.sai.msu.su [158.250.29.2]) by svr1.postgresql.org (Postfix) with ESMTP id E2D173A3BC8 for ; Tue, 16 Nov 2004 16:17:53 +0000 (GMT) Received: from ra (ra [158.250.29.2]) by ra.sai.msu.su (8.12.10/8.12.10) with ESMTP id iAGGHZQT017940; Tue, 16 Nov 2004 19:17:35 +0300 (MSK) Date: Tue, 16 Nov 2004 19:17:35 +0300 (MSK) From: Oleg Bartunov X-X-Sender: megera@ra.sai.msu.su To: =?iso-8859-15?q?Herv=E9_Piedvache?= Cc: Michael Fuhr , pgsql-performance@postgresql.org Subject: Re: Tsearch2 really slower than ilike ? In-Reply-To: <200411161648.11519.herve@elma.fr> Message-ID: References: <200411161555.59144.herve@elma.fr> <20041116153256.GA6026@winnie.fuhr.org> <200411161648.11519.herve@elma.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/227 X-Sequence-Number: 9181 could you provide me a dump of your table (just id and tsvector columns), so I could try on my computer. Also, plain query (simple and clean) which demonstrated your problem would be preferred next time ! Oleg On Tue, 16 Nov 2004, [iso-8859-15] Herv? Piedvache wrote: > Michael, > > Le Mardi 16 Novembre 2004 16:32, Michael Fuhr a ?crit : >> On Tue, Nov 16, 2004 at 03:55:58PM +0100, Herv? Piedvache wrote: >>> WHERE s.idx_site_name @@ to_tsquery('atari'); >> >> How much text does each site_name field contain? From the field >> name I'd guess only a few words. Based on my own experience, if >> the fields were documents containing thousands of words then I'd >> expect tsearch2 to be faster than ILIKE by an order of magnitude >> or more. > > Yes site name ... is company names or web site name ... so not many word in > each record ... but I don't understand why more words are more efficient than > few words ?? sorry ... > > Regards, > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83