That would be i-series talk — missed the keywords
Do your select on the physical file or the view.
The view’s select should be on the physical file.
Don’t do your select on a logical.
Include the where clause to define which records you want.
Include the order by clause to indicate the delivery order
The query engine will decide how to get and sort your request
– we hope it picks an index where performance is critical
because it’s a little faster than a logical or creating an index on the fly
– try navigator SQL analyze
By key I assume that you are talking about the Primary Key of the table. The Primary Key is a logical object. By that I mean that is simply defines a set of properties on one column or a set of columns to require that the columns which make up the primary key are unique and that none of them are null. Because they are unique and null, these values (or value if your primary key is a single column) can then be used to identify a single row in the table every time. In most if not all database platforms the Primary Key will have an index created on it.
An index on the other hand doesn’t define uniqueness. An index is used to more quickly find rows in the table based on the values which are