Re: Mnogosearch (Was: Re: website doc search is ... ) - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Mnogosearch (Was: Re: website doc search is ... )
Date
Msg-id 200401010548.i015mfa12042@candle.pha.pa.us
Whole thread Raw
In response to Mnogosearch (Was: Re: website doc search is ... )  ("Marc G. Fournier" <scrappy@postgresql.org>)
Responses Re: Mnogosearch (Was: Re: website doc search is ... )  ("Marc G. Fournier" <scrappy@postgresql.org>)
Re: Mnogosearch (Was: Re: website doc search is ... )  ("Marc G. Fournier" <scrappy@postgresql.org>)
List 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

pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Mnogosearch (Was: Re: website doc search is ... )
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Mnogosearch (Was: Re: website doc search is ... )