Re: [HACKERS] ORDER BY optimisations - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] ORDER BY optimisations
Date
Msg-id m0zZeUT-000EBPC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] ORDER BY optimisations  (jwieck@debis.com (Jan Wieck))
List pgsql-hackers
>     1.  the plan is a Sort->IndexScan,
>
>     2.  there is an ORDER BY clause,
>
>     3.  the  index  choosen by the planner matches ALL attributes
>         given in the ORDER BY clause  (extra  indexed  attributes
>         not in ORDER BY ignored),

    Ooops  -  sorry. Took another look at the patch and saw, that
    it actually does not ignore extra attributes  in  the  index.
    Maybe you want to force sort suppression then too and comment
    out the 'return TRUE' for this case.

    BTW: This or an enhanced  version  (suppressing  more  stupid
    sort  cases)  is  my  first  candidate for the v6.4.1 feature
    patch.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] ORDER BY optimisations
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] HPUX 10.01 build issues and solutions.