Skip site navigation (1) Skip section navigation (2)

Re: Why is the query not using the index for sorting?

From: Matthew Wakeling <matthew(at)flymine(dot)org>
To: Jonathan Blitz <jblitz(at)013(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why is the query not using the index for sorting?
Date: 2009-11-23 11:00:09
Message-ID: alpine.DEB.2.00.0911231058560.684@aragorn.flymine.org (view raw or flat)
Thread:
Lists: pgsql-performance
On Sun, 22 Nov 2009, Jonathan Blitz wrote:
> I have a table with a number of columns.
>  
> I perform
>  
> Select *
> from table
> order by a,b
>  
> There is an index on a,b which is clustered (as well as indexes on a and b alone).
> I have issued the cluster and anyalze commands.

Did you analyse *after* creating the index and clustering, or before?

Matthew

-- 
 [About NP-completeness] These are the problems that make efficient use of
 the Fairy Godmother.                    -- Computer Science Lecturer

In response to

Responses

pgsql-performance by date

Next:From: Matthew WakelingDate: 2009-11-23 12:44:05
Subject: Re: Query times change by orders of magnitude as DB ages
Previous:From: Sergey AleynikovDate: 2009-11-22 16:13:46
Subject: Re: Query times change by orders of magnitude as DB ages

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group