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

2009-11-23 Thread Jonathan Blitz
] Why is the query not using the index for sorting? 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

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

2009-11-23 Thread Matthew Wakeling
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* creati

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

2009-11-22 Thread Jonathan Blitz
Many thanks. I'll give it a try and see what happens. -Original Message- From: Craig Ringer [mailto:cr...@postnewspapers.com.au] Sent: Sunday, November 22, 2009 3:25 PM To: Jonathan Blitz Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Why is the query not using the

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

2009-11-22 Thread Craig Ringer
On 22/11/2009 8:50 PM, 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. > > Never

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

2009-11-22 Thread Thom Brown
2009/11/22 Jonathan Blitz > 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. > > Nevertheless, PostgreSQL perf