From: Jochen Erwied <jochen@pgsql-performance.erwied.eu>
To: Anne Rosset <arosset@collab.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Need to increase performance of a query
Date: Thu, 10 Jun 2010 21:22:11 +0200
Message-ID: <98414706.20100610212211@erwied.eu> (raw)
In-Reply-To: <4C113098.5040105@collab.net>
References: <4C1125F0.8090101@collab.net>
<4C112B19.6080908@krogh.cc>
<4C113098.5040105@collab.net>
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@erwied.eu +49-208-38800-18, FAX: -19
Sauerbruchstr. 17 | work: joe@mbs-software.de +49-2151-7294-24, FAX: -50
D-45470 Muelheim | mobile: jochen.erwied@vodafone.de +49-173-5404164
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jochen@pgsql-performance.erwied.eu, arosset@collab.net
Subject: Re: Need to increase performance of a query
In-Reply-To: <98414706.20100610212211@erwied.eu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox