A small performance bug in BTree Infrastructure

Поиск
Список
Период
Сортировка
От Gokulakannan Somasundaram
Тема A small performance bug in BTree Infrastructure
Дата
Msg-id 9362e74e0810230801t41e7df7ax10745c75df88f6cf@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi All,<br />       BTree Insert requires a data-structure called BTStack to report the page splits that have happened
inthe leaf pages to non-leaf pages upwards. It basically goes back and updates those non-leaf pages. But this will
neverhappen in a search operation. You never need to climb upwards for a  Select statement. Actually we can clearly see
thatin the _bt_first function, as soon as we complete calling _bt_search, we call _bt_freestack to free it. So
unnecessarilya BTStack structure is getting formed and deleted.<br />        Inside _bt_search function, if we just add
aif condition to check whether access is for BT_READ, then we can avoid the creation of stack and also remove the
_bt_freestack in the _bt_first function. I just implemented the change and tested it and i am not seeing any
performancedifference(as expected).<br />        <br />        Still i thought of reporting it, so that whoever is
workingon it, can incorporate this change also.<br /><br />Thanks,<br />Gokul.<br /> 

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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Any reason to have heap_(de)formtuple?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unicode escapes in literals