question

Henrik Staun Poulsen avatar image
Henrik Staun Poulsen asked

the writes column in sys.dm_exec_requests shows?

What does the Writes columns in the DMV sys.dm_exec_requests show?

I have tried to Google it, but failed. BOL does not tell what it is.
Is it 8kb pages, or rows written, or ?

I have a MERGE command running.
I know how many rows needs inserting and how many updating (aprox), so I had hoped that I could see how far it is.

sql-server-2008dynamic-management-view
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt Whitfield avatar image
Matt Whitfield answered

I've just done a bit of testing with [sys].[dm_exec_sessions], and the [writes] column in that seems to show pages, not rows. So I don't know if they would be consistent, but I would expect them to be.

To be honest, it's worth waiting until later and hoping Grant answers - because this is certainly an area where his knowledge makes the rest of us look like kids at play school...

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fatherjack avatar image
Fatherjack answered

I would take the BOL statement of

Number of writes performed by this request. Is not nullable.

to mean a count of rows written.

If anyone knows it to be different then I have some work to do here ... (!)

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
I need wood split... It's pages.
0 Likes 0 ·
Blackhawk-17 avatar image Blackhawk-17 commented ·
As a "general rule" SQL reads and writes in Pages. The O/S worries about bytes.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.