Index?

Last post 10-25-2007 4:42 PM by satya. 4 replies.
Page 1 of 1 (5 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 10-25-2007 1:26 PM

    Index?

    I have 2 questions1) One big index performs better then 2 small indexes or the opposite?2) I have table with 17242772 rows and I have index1 and index2 on that table, index1 has 14 columns and index2 has 3 columns. Developer created a new report in crystal it takes 2:47 min. I analyze the query through index tuning wizard which recommend me to create some non-cluster indexes but all those columns are already indexed in index1 and index2. So my question is do I have to create index3 as tuning advisor recommended. Why can’t SQL Server see all those columns are index for other reports?  Thanks

     

  • 10-25-2007 2:02 PM In reply to

    Re: Index?

    I think we think more information, such as the table structure including the indices and the execution plan to provide good suggestions.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Contributing Editor, Writer & Forum Moderator http://www.sql-server-performance.com
    Webmaster: http://www.insidesql.org
    View Frank Kalis's profile on LinkedIn

    XING
  • 10-25-2007 2:32 PM In reply to

    Re: Index?

    Execution plans shows sorting takes the longest. Can you or anyone else please answer my question#2

  • 10-25-2007 3:19 PM In reply to

    • Greg Larsen
    • Top 75 Contributor
    • Joined on 10-02-2007
    • Tumwater, Washington, USA
    • Posts 245

    Re: Index?

    I would say it really depend.  What columns are returned, what columns are used to constrain your query, and order do you want your data returned and grouped.  Potientially a new covering index that has only a few indexed columns and a number of include columns would perform better.   

    For SQL Server Examples and SQL Server DBA Dashboard tool go to --http://www.sqlserverexamples.com

    Greg Larsen, MCITP
  • 10-25-2007 4:42 PM In reply to

    • satya
    • Top 10 Contributor
    • Joined on 11-05-2002
    • United Kingdom
    • Posts 22,567
    • Microsoft MVP
      Moderator

    Re: Index?

    If you doubt on the indexes then you could take help of PROFILER and INDEX TUNING WIZARD, also try to wrap up the process with a stored procedure for maximum efficiency during the execution, as you will observe difference in processing the query within QA and from reporting application.

    -Satya S K J

    SQL Server MVP



    Knowledge is Power, you will gain by sharing it. SSQA.net - Invisible contributions to the users & visible success in SQL Community.
Page 1 of 1 (5 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.