Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    31

    Unanswered: Query Plans & Statistics

    Gurus,

    I'm trying to get an application finished that works like Query Analizer in
    terms of returning query plans and statistics.

    Problem the co-author is having:

    >In using ADO to connect to SQL Server, I'm trying to retrieve multiple
    >datasets AND statistics that are usually returned via the OnInfoMessage
    >event. For those that are familiar with SQL Server, I need the results
    >returned by the SET STATISTICS IO ON and SET STATISTICS PROFILE ON options.
    >Anyone had any luck doing this before?

    Can anyone shed any light on this please?

    Thanks.

    BTW if anyone wants to take a look at the tool so far - to see what I'm
    delving into:
    http://81.130.213.94/myforum/forum_p...sp?TID=78&PN=1


    Much Appreciated!!

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    How about Object Browser pane? This one comes handy very often, you know?

  3. #3
    Join Date
    Jan 2004
    Posts
    31
    I'm not sure what you mean by Object Browser Pane - unless you mean something in Microsoft Query analizer...??

    The problem I have is that this is a new tool that doesn't have any panes..just pains...arghhh.

    Thanks for the help though!

  4. #4
    Join Date
    Jan 2004
    Posts
    31
    Here's some more info from the original post

    http://81.130.213.94/myforum/forum_p...sp?TID=26&PN=1

    SET STATISTICS IO ON
    SELECT 1 FROM sometable

    IO statistics are returned as messages in the 2nd (blank) recordset. Good.

    SET STATISTICS PROFILE ON
    SELECT 1 FROM sometable

    Execution plan is returned in the 2nd recordset. Good.

    SET STATISTICS IO ON
    SET STATISTICS PROFILE ON
    SELECT 1 FROM sometable

    2 recordsets are returned, the 2nd containing the execution plan. But the
    IO statistics are nowhere to be found. Help!

    SET STATISTICS IO ON
    SET STATISTICS PROFILE ON
    SELECT 1 FROM sometable
    PRINT 1

    3 recordsets are returned. The 2nd one contains the execution plan, the
    third is blank but contains '1' as a info message. The IO statistics are
    nowhere to be found. Help!

Posting Permissions

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