Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Poland
    Posts
    96

    Unanswered: what kind of index

    I have 20 tables (the same schema)

    I use view to search it with union operator.
    now i have indexes on all of the tables on 1 kolumn (nvarchar)

    what kind of index i should use to make it fastest


    index on view ?

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    If your application needs to access views often, consider adding an unique clustered index to your views to significantly improve performance.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Feb 2004
    Location
    Poland
    Posts
    96
    Thanks

    unfortunetly it's not unique field

    is it good solution to build clustered indexes on all 20 tables

    and next clustered index on view ?

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Clustered index on all the tables will have definetly advantage, and if the space is not a concern then go for it.

    Indexed view is also another addition to gain the performance.

    Test it yourselves by creating both seperately and check the preferences.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •