Creating an DDS logical file and using it in an SQL statement DOES NOT
GUARANTEE that the records are returned in the key sequence sepecified in
the DDS description.
The query optimizer will re write the SELECT statement by analyzing the DDS
description based on the physical file. From the DDS description only the
Field Selection, SELECT/OMIT clauses and join information are taken, NOT the
Optimization starts after the query is rewritten. At this time the optimizer
does not know, that originally a logical file with a predefined key was
specified. The optimizer may or may not use the access path specified within
the DDS described logical file!
Before release 7.1 queries containing a DDS described logical file were
rerouted to the old query engine CQE, since only the CQE could analyze the
DDS descriptions. The new query engine is SQL Query Engine and NOT DDS query
With release 7.1 the SQE also can analyze the DDS descriptions.
Mit freundlichen Grüßen / Best regards
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von James H. H. Lampert
Gesendet: Thursday, 12.9 2013 00:02
An: Midrange Systems Technical Discussion
Betreff: Re: getting stomped on ORDER BY
On 9/11/13 2:32 PM, Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx wrote:
You can't use ORDER BY in a view. You'll have to add the order by on
your select statement.
. . . or do a DDS logical file instead. In SQL, a VIEW and an INDEX are
completely separate entities.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l