Index scan is not working

Поиск
Список
Период
Сортировка
От Kiran
Тема Index scan is not working
Дата
Msg-id CAJfd1U6fwVkBiZLE4KzP1+hvOQ=9fU96m5_oyRoquF4zm+W-0Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Index scan is not working  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Re: Index scan is not working  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
Dear All,

I have a table called question which has a ts_vector column weighted_tsv.
I have gin indexed the weighted_tsv column.

When I query using the following 

EXPLAIN ANALYZE select * from question where weighted_tsv @@ to_tsquery('Hur&ofta');

I get the following output

"Bitmap Heap Scan on question  (cost=12.33..25.38 rows=10 width=731) (actual time=0.058..0.062 rows=3 loops=1)"
"  Recheck Cond: (weighted_tsv @@ to_tsquery('Hur&ofta'::text))"
"  Heap Blocks: exact=3"
"  ->  Bitmap Index Scan on weighted_tsv_question_idx  (cost=0.00..12.33 rows=10 width=0) (actual time=0.052..0.052 rows=3 loops=1)"
"        Index Cond: (weighted_tsv @@ to_tsquery('Hur&ofta'::text))"
"Planning time: 0.205 ms"
"Execution time: 0.104 ms"


Why the query is using the Bitmap ? Not the Index scan ?
Also to_tsquery is casting to ::text. Is this normal ?

It would be of great help if anyone point me into right direction.

regards
Kiran

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

Предыдущее
От: Kiran
Дата:
Сообщение: Re: Results in ERROR: syntax error in tsquery:
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: Index scan is not working