Hi,
I am trying to create a view of a large table (1,000,000 rows) which has keys. However, when I run 'help viewname' the output indicates that the resulting view does not contain index/key information. As I intend to use the view rather than the base table to execute queries, I was wondering if the lack of key info will have a detremental effect on the query exectuion time.
You can't create indexes on views rather the query against a view use the indexes on base table. Make sure that your select statement (in create view) uses the indexes.
Sanjay, thanks for your advice. As performance is an issue however, I was wondering if the resulting selects from a view, in general, will take longer than those directly from the base table.
Depends. Take in attention the posibility to use index based on expressions. In certain situation you can make an index in such a way that it will speed up exactly that view/query that you want.
Bookmarks