Re: Using indexes for ORDER BY and PARTITION BY clause in windowing functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Using indexes for ORDER BY and PARTITION BY clause in windowing functions
Date
Msg-id 28218.1382540289@sss.pgh.pa.us
Whole thread Raw
In response to Using indexes for ORDER BY and PARTITION BY clause in windowing functions  (Sameer Kumar <sameer.kumar@ashnik.com>)
Responses Re: Using indexes for ORDER BY and PARTITION BY clause in windowing functions
List pgsql-hackers
Sameer Kumar <sameer.kumar@ashnik.com> writes:
> I am not sure why but my PostgreSQL does not seem to be using indexes for
> ORDER BY clause or PARTITION BY CLAUSE which I use with windowing function.

When the entire contents of the table have to be read, a seqscan-and-sort
will frequently be estimated as cheaper than an indexscan.  If you think
this is not true on your hardware, you might need to adjust
random_page_cost.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sigh, my old HPUX box is totally broken by DSM patch
Next
From: Stephen Frost
Date:
Subject: Re: Sigh, my old HPUX box is totally broken by DSM patch