What's the volume here? Adding the ORDER BY clause will cause the data to be
pre-processed before the result set starts to get returned. 
Also, if you ignore how long it takes to *start* returning the result set,
how do the two compare in returning the *complete* result set?

Regards

JayJay

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Shane Ricciardi
Sent: 16 December 2010 04:06
To: u2-users@listserver.u2ug.org
Subject: [U2] universe SQL sort speed with mv associations?

Hi. I have a table that contains an association of multi-valued columns. I'm
issuing a SELECT against the table and referencing the columns. If I don't
ORDER
BY on any of the columns, the query returns data quickly (either executing
from
within a uv basic program and capturing output or via uniObjects command).
However, as soon as I include an ORDER BY, the run-time of the query
increases
substantially. We're talking seconds vs. minutes. Why? Is it because of the
multi-valued output data being shuffled to display correctly? Kind of like
how
WHEN with a BY-EXP works? The query is simple:

SELECT FIELD1, FIELD2, FIELD3, FIELD4 FROM TABLE_THE.ASSOC WHERE FIELD3 >=
'01/01/2010' ORDER BY FIELD1,FIELD2,FIELD3,FIELD4;

THE.ASSOC:
0001 PH
0002 FIELD1 FIELD2 FIELD3 FIELD4

Any help is appreciated. Thanks!

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to