Question about a CIDR based query

Поиск
Список
Период
Сортировка
От Georgos Siganos
Тема Question about a CIDR based query
Дата
Msg-id ebba5a930406241343173046c7@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about a CIDR based query
Список pgsql-sql
Hello,

Consider that I have the following table:

Create Table tmp(
            route_id     int    NOT NULL,
            route         cidr   NOT NULL,
            Data         varchar(100) NOT NULL)

The table contains ~40,000 routes and I have an index on route.

The query I am interested in is:

select * from tmp where route >>= some_cidr

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

Any idea how I can make  the query run faster?

Thanks,
George


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: feature request ?
Следующее
От: "Phil Endecott"
Дата:
Сообщение: Re: Normalising an existing table - how?