Re: Removing useless DISTINCT clauses

Поиск
Список
Период
Сортировка
От Finnerty, Jim
Тема Re: Removing useless DISTINCT clauses
Дата
Msg-id 4E453212-55C9-41DF-9977-840FDFB4CD31@amazon.com
обсуждение исходный текст
Ответ на Re: Removing useless DISTINCT clauses  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: Removing useless DISTINCT clauses
Список pgsql-hackers
I feel strongly that eliminating the entire DISTINCT or GROUP BY clause (when there are no aggs) is an important
optimization,especially when the incremental cost to test for it is so tiny.  I'm happy to submit that as a separate
thread.

My goal here was to move the original proposal along and contribute a little something back to the community in the
process. DISTINCT optimization is currently quite poor compared to the leading commercial RDBMS alternatives, and doing
unnecessaryDISTINCT in the single-table case is an example of that.  There are other missing DISTINCT optimizations.
 

I'll explore a proper way to test that it's in the single-relation case, and will post a separate thread for the
'removeunnecessary DISTINCT' optimization.
 

Cheers,

    /Jim


On 8/23/18, 11:12 PM, "David Rowley" <david.rowley@2ndquadrant.com> wrote:

    You might be confusing #1 and #2. My concern is with #2.  The existing
    GROUP BY clause optimisation is almost identical to #1. I just wanted
    to also apply it to the DISTINCT clause.
    
    -- 
     David Rowley                   http://www.2ndQuadrant.com/
     PostgreSQL Development, 24x7 Support, Training & Services
    


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: remove ATTRIBUTE_FIXED_PART_SIZE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)