Andreas Kostyrka <[EMAIL PROTECTED]> writes:
> Ambrus Wagner (IJ/ETH) wrote:
>> Is there a way to prevent PostgreSQL from doing a full sort on the result
>> set after the unions have been completed? Even if I write
>>
>> (select a,b,c,d,e from table1 order by a,b) union all
>> (select a,b,c,d,e f
"Andreas Kostyrka" <[EMAIL PROTECTED]> writes:
>> (select a,b,c,d,e from table1 order by a,b) union all
>> (select a,b,c,d,e from table2 order by a,b) union all
>> etc...
>> (select a,b,c,d,e from tablen order by a,b) order by a,b;
>>
>> PostgreSQL does not seem to realise (maybe it should not
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I think you'll have to stick with doing your sorting (or merging) in
your client. Don't think that PG recognizes the fact it's just a merge step.
Andreas
Ambrus Wagner (IJ/ETH) wrote:
> Dear All,
>
> I have several tables containing data sorted by 2
Dear All,
I have several tables containing data sorted by 2 keys (neither are keys in db
terms (not unique), however). I would like to retrieve all rows from all tables
sorted by the same keys, essentially merging the contents of the tables
together. While I am completely aware of sort order no