X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1CC8CD1B18C for ; Sun, 25 Jul 2004 16:07:48 -0300 (ADT) 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 72404-06 for ; Sun, 25 Jul 2004 19:07:45 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id E71B2D1B181 for ; Sun, 25 Jul 2004 16:07:40 -0300 (ADT) Received: from [192.168.0.1] (dsl-082-082-215-083.arcor-ip.net [82.82.215.83]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i6PJ7ZI29180; Sun, 25 Jul 2004 21:07:35 +0200 Subject: Re: regex engine From: Markus Bertheau To: Tom Lane Cc: Jean-Luc Lachance , Keith Gallant , pgsql-sql@postgresql.org In-Reply-To: <14659.1090776861@sss.pgh.pa.us> References: <1090763779.9204.1.camel@teetnang> <4103C656.4070109@sympatico.ca> <1090772515.9204.3.camel@teetnang> <14659.1090776861@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Message-Id: <1090782455.9204.8.camel@teetnang> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Sun, 25 Jul 2004 21:07:35 +0200 Content-Transfer-Encoding: quoted-printable 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: 200407/219 X-Sequence-Number: 18471 =D0=92 =D0=92=D1=81=D0=BA, 25.07.2004, =D0=B2 19:34, Tom Lane =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > Markus Bertheau writes: > > =D0=92 =D0=92=D1=81=D0=BA, 25.07.2004, =D0=B2 16:40, Jean-Luc Lachance = =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> Better yet: > >>=20 > >> SELECT * FROM table WHERE phrase ~ '^[0-9]'; >=20 > > Not so sure if that's better - the regex engines aren't the fastest. >=20 > [ raised eyebrow... ] I was under the impression that we had a pretty > good one as of PG 7.4. Have you tested it lately? I wasn't trying to say that pg's regex engine was particularly slow, but that regex engines in general are slower than an exact substring search. If I'm mistaken here, please tell. pg's regex engine does have one shortcoming though: it doesn't know UTF-8. --=20 Markus Bertheau