Re: GiST -- making my index faster makes is slower

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: GiST -- making my index faster makes is slower
Дата
Msg-id 2966.1082150936@sss.pgh.pa.us
обсуждение исходный текст
Ответ на GiST -- making my index faster makes is slower  (David Blasby <dblasby@refractions.net>)
Ответы Re: GiST -- making my index faster makes is slower  (David Blasby <dblasby@refractions.net>)
Список pgsql-hackers
David Blasby <dblasby@refractions.net> writes:
> The old way used a BOX (bounding box of 4 doubles) as the key in the index.
> The new way uses a bounding box of 4 single-precision floats (its only 
> 16 bytes long - a BOX is 32).

> It turns out this is not the case - its significantly slower.  I think 
> it to do with more keys fitting in the leaf tuples.

Hm.  With twice as many keys per page, you'd think that it could be no
more than 2x slower, if the problem is one of O(n) search through the
keys on the page.  That doesn't explain a 10x slowdown.  Could it be
that some part of the GIST code is O(n^2), or worse, in the number of
keys per page?  If so, perhaps it's fixable.

I'd suggest profiling the backend with both key types to get an idea of
where the time is going.
        regards, tom lane

PS: actually, allowing for the 12-byte index tuple overhead, you
couldn't have even twice as many keys per page.  So there's something
mighty odd here.  Keep us posted.


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

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: Re: 7.5 beta version]
Следующее
От: David Blasby
Дата:
Сообщение: Re: GiST -- making my index faster makes is slower