X-Original-To: pgsql-performance@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 7B708924B4C for ; Tue, 27 May 2003 16:06:33 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 84136-04 for ; Tue, 27 May 2003 16:06:29 -0400 (EDT) Received: from tomts26-srv.bellnexxia.net (tomts26.bellnexxia.net [209.226.175.189]) by developer.postgresql.org (Postfix) with ESMTP id 1066D921AAD for ; Tue, 27 May 2003 16:06:28 -0400 (EDT) Received: from [10.0.2.5] ([216.208.117.7]) by tomts26-srv.bellnexxia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030527200626.FJNN11703.tomts26-srv.bellnexxia.net@[10.0.2.5]>; Tue, 27 May 2003 16:06:26 -0400 Subject: Re: Wildcard searches & performance question From: Rod Taylor To: Grega Bremec Cc: Postgresql Performance In-Reply-To: <20030527210908.A571@elbereth.noviforum.si> References: <20030527210908.A571@elbereth.noviforum.si> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-+omd7A7+aRlPXDgIrJnu" Organization: Message-Id: <1054065986.93507.43.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 27 May 2003 16:06:26 -0400 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/228 X-Sequence-Number: 2007 --=-+omd7A7+aRlPXDgIrJnu Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > feasible in such cases? Or in other words, can I somehow optimize LIKE and > regexp queries that start with a wildcard? If they start with a wildcard, but end in character data you could reverse the string and index that... If they start and end with a wildcard, your best bet is a full text indexing solution (various contrib modules). --=20 Rod Taylor PGP Key: http://www.rbt.ca/rbtpub.asc --=-+omd7A7+aRlPXDgIrJnu Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA+08VC6DETLow6vwwRAumSAJ9OQj3YzdOs961ihgCtJ14FlBBL/gCfSrGI +pfft8Hn4xMYi/DIh3bx+eM= =U2fP -----END PGP SIGNATURE----- --=-+omd7A7+aRlPXDgIrJnu--