X-Original-To: pgsql-bugs-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BF9249FA5DD for ; Tue, 4 Jul 2006 13:27:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 92935-05 for ; Tue, 4 Jul 2006 13:27:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B02F19FA4A5 for ; Tue, 4 Jul 2006 13:27:39 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from www.elogos.de (alextrapp1.equinoxe.de [217.22.192.104]) by svr4.postgresql.org (Postfix) with ESMTP id E033B5AF06C for ; Tue, 4 Jul 2006 16:27:38 +0000 (GMT) Received: from www.elogos.de (localhost [127.0.0.1]) by www.elogos.de (Postfix) with ESMTP id C91654BB05; Tue, 4 Jul 2006 16:24:34 +0000 (UTC) Received: by www.elogos.de (Postfix, from userid 4000) id C50B64BB0A; Tue, 4 Jul 2006 16:24:34 +0000 (UTC) Date: Tue, 4 Jul 2006 16:24:34 +0000 To: Tomasz Ostrowski Cc: Tom Lane , pgsql-bugs@postgresql.org Subject: Re: query very slow when enable_seqscan=on Message-ID: <20060704162434.GD20619@www.trapp.net> References: <20060703203105.GA2801@batory.org.pl> <7353.1151967946@sss.pgh.pa.us> <20060704083733.GA20102@batory.org.pl> <13853.1152021389@sss.pgh.pa.us> <20060704144406.GA21511@batory.org.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fXStkuK2IQBfcDe+" Content-Disposition: inline In-Reply-To: <20060704144406.GA21511@batory.org.pl> User-Agent: Mutt/1.5.9i From: tomas@tuxteam.de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/20 X-Sequence-Number: 15365 --fXStkuK2IQBfcDe+ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 04, 2006 at 04:44:08PM +0200, Tomasz Ostrowski wrote: > On Tue, 04 Jul 2006, Tom Lane wrote: >=20 > > I think the real problem here is that regex matching is the wrong > > tool for the job. Have you looked into a full-text index > > (tsearch2)? >=20 > So much to do with so little time... For what it's worth, I've got pretty good results (at least taking the little amount of work I put into it) with trigram indexes, courtesy of $PGCONTRIB/pg_trgm.sql, just another amazing little piece by Bartunov and Sigaev. Let me know if you'd like to hear more. Regards -- tom=E1s --fXStkuK2IQBfcDe+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEqpZCBcgs9XrR2kYRAuqEAJ9dIwhl+rKvztYyn8PSBI5gnoaspQCdGTMh n/b9OwcGPMh+LN50K2YL63c= =XWfB -----END PGP SIGNATURE----- --fXStkuK2IQBfcDe+--