Tracking Processes

  • Comments posted to this topic are about the item Tracking Processes

    Best,
    Naseer Ahmad
    SQL Server DBA

  • Thanks Naseer...a very easy question to conclude this week 🙂

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • I answered "Non of the above". I thought DiskIO in sp_Who2 means reads and writes combined, not just reads as question asks. Am I wrong?

    --Vadim R.

  • I thought the same, none of the above. Also thinking that Disk IO is a combination of reads and writes, which makes it unclear how many of them were reads.

  • rVadim (9/20/2012)


    I thought DiskIO in sp_Who2 means reads and writes combined, not just reads as question asks. Am I wrong?

    You are absolutely right. Running 'sp_helptext sp_who2', we can see the following:

    -------------------- Capture consistent sysprocesses. -------------------

    select

    spid

    ...

    ,physical_io

    ...

    into #tb1_sysprocesses

    from master.dbo.sysprocesses with (nolock)

    --------Output the report.

    SELECT

    SPID = convert(char(5),spid)

    ...

    ,DiskIO = substring(convert(varchar,physical_io),1,@charMaxLenDiskIO)

    ...

    from

    #tb1_sysprocesses

    where

    ...

    According to BOL (http://msdn.microsoft.com/en-us/library/ms179881.aspx), the column 'physical_io' in sys.sysprocesses contains 'Cumulative disk reads and writes for the process'. So the correct question is indeed 'None of the above' (although I'd 'guessed' the author's thoughts and answered 'sp_who2' :hehe: )

  • rVadim (9/20/2012)


    I answered "Non of the above". I thought DiskIO in sp_Who2 means reads and writes combined, not just reads as question asks. Am I wrong?

    +1

    (I got the answer right :blush:, but it is wrong... so all wrongs are rights and all rights who thought it was right is wrong)

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • vk-kirov (9/21/2012)


    ...

    (although I'd 'guessed' the author's thoughts and answered 'sp_who2' :hehe: )

    OR probably author can edit the question and add" and writes" in the appropriate place. (only if this is true consideration for him... OR the answer needs to be corrected.)

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • I get it right, but

    rVadim (9/20/2012)


    DiskIO in sp_Who2 means reads and writes combined, not just reads as question asks.

    +1

  • I'm another who answered "None of the above" because the disk IO in sp_who2 is both reads and writes, not just reads--it's the sort of trick answer that a lot of questions on this website would have used.

  • I thought I guessed correctly what Naseer was trying to ask. So, one easy point for me to end the week 🙂 Thanks.


    Sujeet Singh

  • Miss read the question so got it right.

    Should I be happy about this - not sure

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Nice question to end the week, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This was removed by the editor as SPAM

  • A poor question. I answered none of the above simply because DiskIO was a combined figure and the question specifically referenced reads, so my answer is correct.

    Also on a formatting point, no 'A', 'B' or 'C' was defined, nor was this question constrained to particular versions of SQL Server, nor indeed is sp_who2 actually a supported stored procedure.

    ---

    Note to developers:
    CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
    So why complicate your code AND MAKE MY JOB HARDER??!:crazy:

    Want to get the best help? Click here https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help (Jeff Moden)
    My blog: http://uksqldba.blogspot.com
    Visit http://www.DerekColley.co.uk to find out more about me.

  • Love answering a question correctly and getting it wrong. Either correct the question and say total IO and not "reads", or correct the answer.

Viewing 15 posts - 1 through 15 (of 42 total)

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