I'm not sure if it makes any difference but what if you try SELECT FIELD1, FIELD2, FIELD3, FIELD4 FROM TABLE_THE.ASSOC WHERE FIELD3 >= '01/01/2010' ORDER BY @ID,FIELD1,FIELD2,FIELD3,FIELD4;
This would (theoretically) only have to explode/sort the MVs within an item, not against the whole table and may be faster. Stuart. -----Original Message----- 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 _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users