DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Creating Views and indexing views

  1. #1
    Join Date
    Nov 2002
    Posts
    2

    Question 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

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    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

  3. #3
    Join Date
    Nov 2002
    Posts
    2

    Question 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

  4. #4
    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
  •  


Click Here to Expand Forum to Full Width