Re: Problem with result ordering

From: Thorsten Körner <t(dot)koerner(at)cappuccinosoft(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with result ordering
Date: 2007-01-26 17:53:26
Message-ID: 200701261853.26584.t.koerner@cappuccinosoft.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Ted,

Am Donnerstag, 25. Januar 2007 19:53 schrieb Ted Byers:
> The question I'd ask before offering a solution is, "Does the order of the
> id data matter, or is it a question of having all the results for a given
> id together before proceeding to the next id?" The answer to this will
> determine whether or not adding either a group by clause or an order by
> clause will help.
>
> Is there a reason you client app doesn't submit a simple select for each of
> the required ids? You'd have to do some checking to see whether it pays to
> have the ordering or grouping operation handled on the server or client.
> Other options to consider, perhaps affecting performance and security,
> would be parameterized queries or stored procedures.

Yes, the reason is, that a large list of ids are generated from a users
request, coming from outside our application (for example as an EXCEL sheet),
and the output msut be ordered by the ordering in this list.
Surely we can handle this in our client application (java code), but I think
it would be more sexy to have this possibility in the database logic, since
our client-application should not do much more than retrieve data from the db
and then present it.

Thanks for your comments
Thorsten

--
CappuccinoSoft Business Systems
Hamburg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2007-01-26 17:56:39 Predicted lifespan of different PostgreSQL branches
Previous Message Tom Lane 2007-01-26 17:45:24 Re: Rollback using WAL files?