Re: Order By Clause, Slows Query Performance? - Mailing list pgsql-performance

From Albe Laurenz
Subject Re: Order By Clause, Slows Query Performance?
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17C591A5@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Order By Clause, Slows Query Performance?  (monalee_dba <monalee@sungraceinfotech.co.in>)
List pgsql-performance
monalee_dba wrote:
> Eg. SELECT col1, col2, col3,....col10 FROM table1;
> 
> For above query If I didn't mention ORDER BY clause, then I want to know
> selected data will appear in which order by a query planner?
> 
> Because I have huge size table, and when I applied ORDER BY col1, col2..in
> query the
> performance is soo bad that I can't offred.
> What should I do ? Because my requirement is data with ordered column.

A B-Tree index may help with that:
http://www.postgresql.org/docs/current/static/indexes-ordering.html
Consider a multicolumn index.

Yours,
Laurenz Albe

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance bug in prepared statement binding in 9.2?
Next
From: Torsten Förtsch
Date:
Subject: Re: BitMap Heap Scan & BitMap Index Scan