MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
Query Optimisation -

in Search

Query Optimisation

Last post 06-26-2008 1:54 AM by narchand. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-05-2008 9:08 AM

    Query Optimisation

    I have a database which has one table which has more than 2million records and increases by 900 records per day. What l need is assistance on how l can optimise data retrieval queries that extract data from this table.

  • 06-05-2008 11:16 AM In reply to

    • aprato
    • Top 10 Contributor
    • Joined on 12-01-2007
    • Greater Boston
    • Posts 190

    Re: Query Optimisation

    The requirement is a little vague.

    What does the table look like?
    What indexes are present currently?
    What queries are issued against the table?
    Do you need all these rows?  Can some of them be archived?

  • 06-05-2008 2:46 PM In reply to

    Re: Query Optimisation

    It all depends...

    Make sure you have proper indexes and no gragmentation.

    Update statistics regularly...

    Check if your table has any missing indexes if so then add them...

    http://blogs.msdn.com/bartd/archive/2007/07/19/are-you-using-sql-s-missing-index-dmvs.aspx

     

    MohammedU
    SQL Server MVP
  • 06-26-2008 1:54 AM In reply to

    Re: Query Optimisation

    Hello,

         Well..It depends on many factors like

             01. The way the table is designed - with appropriate datatypes,Appropriate indexes,Partitioned or non partitioned

             02. The health of Indexes - should not be heavily fragmented and statistics are uptodate

             03. The data access mechanism - data should be accessed by writing the most optimzed code and applying the appropriate locks and 

                     isolation levels with relevance to the type operation being performed ie.select/update/insert/delete

             And also you can check the actual Execution plan and statistics for the queries pointing to this table and can be fine tuned if they are not responding with in a reasonable time.

    Thanks,

    Narchand

Page 1 of 1 (4 items)