pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Best way to index large text/varchar fields
2+ messages / 2 participants
[nested] [flat]

* Best way to index large text/varchar fields
@ 2006-06-09 15:45 Chris Hoover <revoohc@gmail.com>
  2006-06-09 16:24 ` Re: Best way to index large text/varchar fields Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Chris Hoover @ 2006-06-09 15:45 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Best way to index large text/varchar fields
  2006-06-09 15:45 Best way to index large text/varchar fields Chris Hoover <revoohc@gmail.com>
@ 2006-06-09 16:24 ` Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Joshua D. Drake @ 2006-06-09 16:24 UTC (permalink / raw)
  To: Chris Hoover <revoohc@gmail.com>; +Cc: pgsql-admin

Chris Hoover wrote:
> 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?

If you are indeed using phrases, and thus paragraphs of text, you should 
look into Tsearch2.

Joshua D. Drake

> 
> Thanks,
> 
> Chris


-- 

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-06-09 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 15:45 Best way to index large text/varchar fields Chris Hoover <revoohc@gmail.com>
2006-06-09 16:24 ` Joshua D. Drake <jd@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox