Re: SP-GiST for ranges based on 2d-mapping and quad-tree

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: SP-GiST for ranges based on 2d-mapping and quad-tree
Дата
Msg-id 1341298078.6857.14.camel@jdavis
обсуждение исходный текст
Ответ на SP-GiST for ranges based on 2d-mapping and quad-tree  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: SP-GiST for ranges based on 2d-mapping and quad-tree  (Jeff Davis <pgsql@j-davis.com>)
Re: SP-GiST for ranges based on 2d-mapping and quad-tree  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Thu, 2012-06-14 at 02:56 +0400, Alexander Korotkov wrote:
> Hackers,
> 
> 
> attached patch implements quad-tree on ranges. Some performance
> results in comparison with current GiST indexing.
> Index creation is slightly slower. Probably, it need some
> investigation. Search queries on SP-GiST use much more pages. However
> this comparison can be not really correct, because SP-GiST can pin
> same buffer several times during one scan. In CPU search queries on
> SP-GiST seems to be slightly faster. Dramatical difference in "column
> <@ const" query is thanks to 2d-mapping.
> 

More comments:

* Minor rebase is required (simple int2 -> int16).

* Perhaps I'm mistaken, but the following code in getQuadrant() looks
wrong to me, shouldn't the 1 and 2 be reversed?
       if (range_cmp_bounds(typcache, &upper, ¢roidUpper) >= 0)           return 1;       else           return 2;

* in the "choose" method, why does in->allTheSame unconditionally match?
Why not split? Similarly, why does inner_consistent always match when
the nodes are allTheSame?

* It's a little confusing having empty prefixes mean that empty range go
to node0, and non-empty ranges meaning that empty ranges go to node4
(quadrant 5). Why can't there just always be 5 nodes, and iff all the
ranges are empty, then the prefix is NULL?

And for that matter, let's let the quadrant equal the node number, and
have the empty ranges in node0. I don't see much point in always
subtracting 1 from the quadrant number.

Regards,Jeff Davis



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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Patch: add conversion from pg_wchar to multibyte
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: SP-GiST for ranges based on 2d-mapping and quad-tree