Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    2

    Question Unanswered: How to gather SELECT Statistics?

    Hi folks

    I wonder if anyone has any pointers on how to gather statistics for SELECT queries? For instance, say 10 rows are returned by a query, is it possible to log which rows where returned?

    TIA

    Jarud

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    The number of rows returned is stored in the @@ROWCOUNT variable. You can get the exact rows returned by, ummm..... well, how 'bout by RUNNING THE QUERY?
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    There's no way that I know to automate the process.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

  4. #4
    Join Date
    May 2004
    Posts
    2
    Thanks for the replies. I did in fact want to track which rows are returned without having to step through the rows manually when a query is executed. I guess there are ways of doing this with a little trigger work.

    cheers

    Jarud

Posting Permissions

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