-
Creating Views and indexing views
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.
Thanks,
Paul
-
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.
HTH
Sanjay
-
further queston
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.
Thanks,
Paul
-
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.
ovidius over!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|