How can we improve Microsoft Azure SQL Data Warehouse ?

@@ROWCOUNT Support

Please enable @@ROWCOUNT?

Furthermore considering that we cannot switch NOCOUNT on, then why should it be such a secret/coded mission to track the number of rows affected by the most recent snippet of code? The proposed work-around seems onerous and doesn't always work (for dynamic SQL) yet my query window still knows and always-prints the fact that it returned 15 rows to me, for example, so why can we not leverage this elementary information inside the selfsame query (?):

SELECT SUM(row_count) AS row_count
FROM sys.dm_pdw_sql_requests
WHERE row_count <> -1
AND request_id IN
( SELECT TOP 1 request_id
FROM sys.dm_pdw_exec_requests
WHERE session_id = SESSION_ID()
AND resource_class IS NOT NULL
ORDER BY end_time DESC
)

31 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    LukeLuke shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Simon WhiteleySimon Whiteley commented  ·   ·  Flag as inappropriate

        We're currently hitting an issue with this one - we're using the workaround query you've got above you rowcount logging, but we're running lots of procedures in parallel which each kick off a stats rebuild. The stats rebuild FLOODS the sql_requests table and forces to be aged out before we've had a chance to get their rowcount.

        A rowcount solution that is susceptible to a race condition isn't a good solution especially, as mentioned, the query window displays the rows updated so the metadata must be available somewhere!

        Hoping this gets sorted soon...

        Simon

      Feedback and Knowledge Base