Re: Need to increase performance of a query

From: Jochen Erwied <jochen(at)pgsql-performance(dot)erwied(dot)eu>
To: Anne Rosset <arosset(at)collab(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Need to increase performance of a query
Date: 2010-06-10 19:22:11
Message-ID: 98414706.20100610212211@erwied.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Thursday, June 10, 2010, 8:36:08 PM you wrote:

> psrdb=# (SELECT
> psrdb(# MAX(item_rank.rank) AS maxRank
> psrdb(# FROM
> psrdb(# item_rank item_rank
> psrdb(# WHERE
> psrdb(# item_rank.project_id='proj2783'
> psrdb(# AND item_rank.pf_id IS NULL
> psrdb(#
> psrdb(# )
> psrdb-# ORDER BY
> psrdb-# maxRank DESC;

Don't think it does really matter, but why do you sort a resultset
consisting of only one row?

--
Jochen Erwied | home: jochen(at)erwied(dot)eu +49-208-38800-18, FAX: -19
Sauerbruchstr. 17 | work: joe(at)mbs-software(dot)de +49-2151-7294-24, FAX: -50
D-45470 Muelheim | mobile: jochen(dot)erwied(at)vodafone(dot)de +49-173-5404164

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2010-06-10 19:23:47 Re: Error with GIT Repository
Previous Message Anne Rosset 2010-06-10 18:36:08 Re: Need to increase performance of a query