Re: Highly Efficient Custom Sorting

От: Tom Lane
Тема: Re: Highly Efficient Custom Sorting
Дата: ,
Msg-id: 4767.1278043730@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Highly Efficient Custom Sorting  (Craig Ringer)
Ответы: Re: Highly Efficient Custom Sorting  (Eliot Gable)
Список: pgsql-performance

Скрыть дерево обсуждения

Highly Efficient Custom Sorting  (Eliot Gable, )
 Re: Highly Efficient Custom Sorting  (Craig Ringer, )
  Re: Highly Efficient Custom Sorting  (Tom Lane, )
   Re: Highly Efficient Custom Sorting  (Eliot Gable, )
    Re: Highly Efficient Custom Sorting  (Matthew Wakeling, )
     Re: Highly Efficient Custom Sorting  (Merlin Moncure, )
    Re: Highly Efficient Custom Sorting  (Craig James, )
     Re: Highly Efficient Custom Sorting  (Craig Ringer, )
      Re: Highly Efficient Custom Sorting  (Eliot Gable, )
       Re: Highly Efficient Custom Sorting  (Merlin Moncure, )
        Re: Highly Efficient Custom Sorting  (Eliot Gable, )
         Re: Highly Efficient Custom Sorting  (Merlin Moncure, )
          Re: Highly Efficient Custom Sorting  (Alvaro Herrera, )
         Re: Highly Efficient Custom Sorting  (Robert Haas, )
          Re: Highly Efficient Custom Sorting  (Eliot Gable, )
           Re: Highly Efficient Custom Sorting  (Joe Conway, )
            Re: Highly Efficient Custom Sorting  (Eliot Gable, )
             Re: Highly Efficient Custom Sorting  (Eliot Gable, )
              Re: Highly Efficient Custom Sorting  (Tom Lane, )
               Re: Highly Efficient Custom Sorting  (Eliot Gable, )
                Re: Highly Efficient Custom Sorting  (Kenneth Marshall, )
 Re: Highly Efficient Custom Sorting  (Merlin Moncure, )

Craig Ringer <> writes:
> On 02/07/10 08:46, Eliot Gable wrote:
>> So, the bottom line is, I need a faster way to do this sorting.

> You haven't showed us how you're doing it at the moment, so it's awfully
> hard to comment usefully on possible approaches.

I'm guessing from tea leaves, but the impression I got from Eliot's
description is that he's using plpgsql functions as sort comparators.
It's not surprising that that sucks performance-wise compared to having
the equivalent logic in C/C++ functions used as comparators on the
client side.  plpgsql is no speed demon.  Best fix might be to code the
comparators as C functions on the server side.

            regards, tom lane


В списке pgsql-performance по дате сообщения:

От: damien hostin
Дата:
Сообщение: Slow query with planner row strange estimation
От: Merlin Moncure
Дата:
Сообщение: Re: Highly Efficient Custom Sorting