X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EE9759FA5E7 for ; Fri, 9 Jun 2006 12:45:31 -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 51720-10 for ; Fri, 9 Jun 2006 12:45:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.203]) by postgresql.org (Postfix) with ESMTP id 773E89FA098 for ; Fri, 9 Jun 2006 12:45:26 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id h30so530343wxd for ; Fri, 09 Jun 2006 08:45:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=di6unc+WqGlJhojYDTUK9tCtJywYkTIP7gLmqAH+UvXtsInuzSY86eNLcd1+kOUIQ0dix2hY5c/acCaDaNeGk9HXuLQR43QI9fko9oYQb0gpywqB9WEaT3ie2nbnGoc1yNdhgg6tJUg4Ag+3FyBHAxaMn9iqYb6wji3vDELkw8o= Received: by 10.70.132.12 with SMTP id f12mr3529344wxd; Fri, 09 Jun 2006 08:45:25 -0700 (PDT) Received: by 10.70.75.9 with HTTP; Fri, 9 Jun 2006 08:45:23 -0700 (PDT) Message-ID: <1d219a6f0606090845q62fad204m95e526effb35fba1@mail.gmail.com> Date: Fri, 9 Jun 2006 11:45:23 -0400 From: "Chris Hoover" To: "pgsql-admin@postgresql.org" Subject: Best way to index large text/varchar fields MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_34552_18964162.1149867923958" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/76 X-Sequence-Number: 22038 ------=_Part_34552_18964162.1149867923958 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline In 8.1, what is the best way to index large text/varchar fields for wild card searches? I am getting good number of queries being submitted for reporting purposes that are doing the following - where like '%some phrase%' and .... Is there a good way to index these fields so that the db engine will use and index? Thanks, Chris ------=_Part_34552_18964162.1149867923958 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline In 8.1, what is the best way to index large text/varchar fields for wild card searches?

I am getting good number of queries being submitted for reporting purposes that are doing the following - where <text/varchar field> like '%some phrase%' and ....
Is there a good way to index these fields so that the db engine will use and index?

Thanks,

Chris
------=_Part_34552_18964162.1149867923958--