How to study performance of using excution plan and trace:hehe:

  • How to study performance of using excution plan and trace 

  • Not sure what you mean here. Are you looking for information on reading execution plans?

  • How to calucalate t-sql query performance using executive plan and trace tools

    i.e i have two same databases one with indexed one with non-index both having data(laks of records) so, i have show to my team performance difference between two querys having index and not having index 

  • Not sure why you're having to prove the worth of Indexes to the rest of ur team, but hey!?

    What you should see is that in the Non-Indexed version you will have a table "Scan" which has to look through the entire table ... in the Indexed version you will have an "Index Seek"!

    The Cost involved will depend on the numbers of rows you have in the table ... but you will be talking Orders of magnitude difference when there are significant numbers of rows!

    A quick way to get a reasonable test going is to run a WHILE loop, say, 10000 times for each scenario (on a quiet network!?) ... and you should see a marked difference in the timings!

    Cheers

     

    Mark

  • This is just a WAG, but I believe what you're looking for is

    SET SHOWPLAN_TEXT {ON | OFF}

    Cheers,

    Ken

  • OK.  I'm running a bit slow today... I re-read your original post and I believe this is what you were looking for (modify to suit your needs):

    USE pubs
    GO
    SET SHOWPLAN_ALL ON
    GO
    -- First query.
    SELECT au_id FROM authors WHERE au_id = '409-56-7008'
    GO
    -- Second query.
    SELECT city
    FROM authors
    WHERE city LIKE 'San%'
    GO
    SET SHOWPLAN_ALL OFF
    GO

  • You can also look at SET STATISTICS IO ON and see the reads and writes that are required.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply