Re: Newbie Developer Question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Newbie Developer Question
Дата
Msg-id 20012.1170352666@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Newbie Developer Question  ("Matthew Campbell" <mtthw.cmpbll@gmail.com>)
Список pgsql-novice
"Matthew Campbell" <mtthw.cmpbll@gmail.com> writes:
> hashbeginscan looks like it sets up a scan and returns it, but it takes the
> number of keys and the array of scan keys.  Where do we get these arguments
> from?

You should probably go read the btree code for awhile to see how it's
done there.  The btree insertion code manufactures some scan keys from
the index tuple given to be inserted, which is what it uses to locate
the correct insertion point in the index (and, hence, any potential
conflicting entries).  But actually I'm not sure that you care about
that for hash --- all you really need is to know which bucket to look
in, and IIRC the hash insertion code calculates that already without
bothering with making scankeys.

            regards, tom lane

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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: query efficiency - Can I speed it up?
Следующее
От: joe speigle
Дата:
Сообщение: fetch cursor into id, set_values .... -> problem