Re: Mnogosearch (Was: Re: website doc search is ... )

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: "Marc G. Fournier" <scrappy@postgresql.org>
Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2004-01-01T05:48:41Z
Lists: pgsql-general
Marc G. Fournier wrote:
> 186_archives=# \d ndict7
>          Table "public.ndict7"
>  Column  |  Type   |     Modifiers
> ---------+---------+--------------------
>  url_id  | integer | not null default 0
>  word_id | integer | not null default 0
>  intag   | integer | not null default 0
> Indexes:
>     "n7_url" btree (url_id)
>     "n7_word" btree (word_id)
> 
> 
> The slowdown is the LIKE condition, as the ndict[78] word_id conditions
> return near instantly when run individually, and when I run the 'url/LIKE'
> condition, it takes "forever" ...

Does it help to CLUSTER url.url?  Is your data being loaded in so
identical values used by LIKE are next to each other?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073