Results 1 to 4 of 4

Thread: Query Tuning

  1. #1
    Join Date
    Sep 2002
    Posts
    5

    Thumbs up Unanswered: Query Tuning

    I have a VB application and with the help of record sets i retrieve as many rows from the SQL Server 2000 DB.

    The query that is in the SP is nested and so while retrieving it took 2 secs for a very few records and so I changed the query to a simple query but with more conditions on the WHERE clause..

    But now also it takes the same 2 secs and i would like it to be reduced to milliseconds..

    Any ideas are most welcome...

    TIA,
    Nisha

  2. #2
    Join Date
    Apr 2002
    Location
    Sunnyvale, CA USA
    Posts
    78
    If you can cut-n-paste the SQL into Query Analyzer you can Display the Query Plan (Ctrl+L) and see what Query Plan it's using, so you can determine whether indexes would help.
    - Andy Abel

  3. #3
    Join Date
    Oct 2002
    Location
    Trivandrum
    Posts
    3
    It will be better if u put the script, u can use the Profiler to see the exact duration the Sql is taking,
    Dont use Select * , better give the exact column names , and in the where condition u try to use id columns.
    -Ashok

  4. #4
    Join Date
    Aug 2002
    Location
    india
    Posts
    41

    Re: Query Tuning

    Originally posted by iamnisha
    I have a VB application and with the help of record sets i retrieve as many rows from the SQL Server 2000 DB.

    The query that is in the SP is nested and so while retrieving it took 2 secs for a very few records and so I changed the query to a simple query but with more conditions on the WHERE clause..

    But now also it takes the same 2 secs and i would like it to be reduced to milliseconds..

    Any ideas are most welcome...

    TIA,
    Nisha
    Reply-

    Try to use 'primary key with clustured indexs' keys reference. after the where clause.

Posting Permissions

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