Re: Queryplan within FTS/GIN index -search.

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Queryplan within FTS/GIN index -search.
Дата
Msg-id 4AE06362020000250002BDFD@gw.wicourts.gov
обсуждение исходный текст
Ответ на Queryplan within FTS/GIN index -search.  (Jesper Krogh <jesper@krogh.cc>)
Список pgsql-performance
Jesper Krogh <jesper@krogh.cc> wrote:

> I'm searching the gin-index for 1-5 terms, where all of them matches
> the same document. TERM1 is unique by itself, TERM2 is a bit more
> common (52 rows), TERM3 more common, TERM4 close to all and TERM5
> all records.

>                Recheck Cond: (ftsbody_body_fts @@ to_tsquery('TERM1
> & TERM2 & TERM3 & TERM4 & TERM5'::text))
>                ->  Bitmap Index Scan on ftsbody_tfs_idx
> (cost=0.00..100.42 rows=1 width=0) (actual time=1508.998..1508.998
> rows=1 loops=1)
>                      Index Cond: (ftsbody_body_fts @@
> to_tsquery('TERM1 & TERM2 & TERM3 & TERM4 & TERM5'::text))
>  Total runtime: 1509.109 ms

> Can this be optimized? (I cannot really prevent users from typing
> stuff in that are common).

I've wondered that myself.  Perhaps a term which is ANDed with others
and is too common could be dropped from the Index Cond and just left
in the Recheck Cond?

-Kevin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Jesper Krogh
Дата:
Сообщение: Queryplan within FTS/GIN index -search.
Следующее
От: Kevin Buckham
Дата:
Сообщение: Table Clustering & Time Range Queries