Re: Question about a CIDR based query

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Question about a CIDR based query
Дата
Msg-id 200406250900.08312.josh@agliodbs.com
обсуждение исходный текст
Ответ на Question about a CIDR based query  (Georgos Siganos <siganos@gmail.com>)
Список pgsql-sql
Georgos,

> select * from tmp where route >>= some_cidr

Can you post an EXPLAIN ANALYZE for this?   And when's the last time you ran 
ANALYZE on the table?

> The index on route is not used and I get a sequential scan. The index is
> used only for the <<= operator.

Most likely Postgres thinks that the >>= query is returning 60% of your table, 
which makes indexes useless.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Markus Bertheau
Дата:
Сообщение: Re: question about which column(s) are the right foreign key
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: feature request ?