Re: Poor performance in inet << cidr join (Resolved)

Поиск
Список
Период
Сортировка
От Axel Rau
Тема Re: Poor performance in inet << cidr join (Resolved)
Дата
Msg-id 60328928649b77f3e95a407d47b400eb@Chaos1.DE
обсуждение исходный текст
Ответ на Poor performance in inet << cidr join  (Axel Rau <Axel.Rau@Chaos1.DE>)
Ответы Re: Poor performance in inet << cidr join (Resolved)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Am 31.10.2005 um 19:53 schrieb Axel Rau:

> The planner does not use the pk-indices. Poking around,
> I could not find an operator class, which supports the containment
> ('<<') operator.
> Is my conclusion correct?
> How can the functionality be extended?
> Is there any implementation available?

rtree_inet from John Hansen does the trick:
    http://archives.postgresql.org/pgsql-hackers/2005-01/msg01038.php
First test shows query time of 85 instead of 2745 seconds:
                                            QUERY PLAN
------------------------------------------------------------------------
-------------------------
  Aggregate  (cost=1768557.75..1768557.75 rows=1 width=0)
    ->  Seq Scan on event e  (cost=0.00..1768040.83 rows=206769 width=0)
          Filter: (NOT (subplan))
          SubPlan
            ->  Index Scan using network_id_rtree on network n
(cost=0.00..21.28 rows=5 width=0)
                  Index Cond: ($0 &<< (id)::inet)

Question: Can rtree_inet be included in the core?
Axel

Axel Rau, Frankfurt, Germany                           +49-69-951418-0

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: PGSQL encryption functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Poor performance in inet << cidr join (Resolved)