Re: Question regarding indices

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question regarding indices
Дата
Msg-id 20432.1284229328@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Question regarding indices  ("Steve" <steeeeeveee@gmx.net>)
Список pgsql-sql
"Steve" <steeeeeveee@gmx.net> writes:
>> Von: Tom Lane <tgl@sss.pgh.pa.us>
>> It's unlikely to make enough difference to be worth the trouble.
>> 
> Making a quick sort is ultra easy in C. Anyway... is there a
> difference in the speed of the query with pre-sorted values or not?
> If there is one then I will go and sort the values.

I didn't opine on whether it was "easy" or not.  I said it was unlikely
to be worth the trouble.  You could very well spend more time sorting
the values than you buy in whatever you might save on the server side.

Each value in the IN list is going to require a separate index probe.
The sorting might buy something in locality of reference for successive
probes, but most likely not enough to notice.
        regards, tom lane


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

Предыдущее
От: "Steve"
Дата:
Сообщение: Re: Question regarding indices
Следующее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: Question about PQexecParams