Re: Problem with result ordering - Mailing list pgsql-general

From Thorsten Körner
Subject Re: Problem with result ordering
Date
Msg-id 200701261853.26584.t.koerner@cappuccinosoft.de
Whole thread Raw
In response to Re: Problem with result ordering  ("Ted Byers" <r.ted.byers@rogers.com>)
List 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rollback using WAL files?
Next
From: Bill Moran
Date:
Subject: Predicted lifespan of different PostgreSQL branches