Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is Reads and Writes in Sys.dm_exec_requests DMV of SQL Server

Tags:

sql-server

dmv

As per explaination given on MSDN at link http://msdn.microsoft.com/en-us/library/ms177648.aspx I am not able to understand the meaning of Reads and Writes fully.whether it is physical or logical or database Reads and Writes. Please help me out in this regards

like image 674
Ganeshkumar Avatar asked Oct 03 '11 07:10

Ganeshkumar


People also ask

What is read in SQL Server?

The I/O from an instance of the SQL Server Database Engine includes logical and physical reads. A logical read occurs every time the Database Engine requests a page from the buffer cache. If the page is not currently in the buffer cache, a physical read first copies the page from disk into the cache.

What is Dm_exec_requests?

dm_exec_requests returns data for all databases on the server. If the table contains database specific data, then it will include a database_id field.

What is SQL Server DMV?

Dynamic management views and functions return server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance.

What type of plan is stored in SYS Dm_exec_query_plan?

The execution plan in XML format for the slow-running query or batch is contained in the query_plan column of the table returned by sys. dm_exec_query_plan .


2 Answers

It's number of physical reads/writes of 8k blocks. So if you multiply it by 8 you will get number of kilobytes that was read/written.

like image 92
sha Avatar answered Nov 20 '22 10:11

sha


Martin answered your question...the logical_reads column corresponds to logical reads (i.e. requests that can be fulfilled by data currently available in the buffer cache) while reads corresponds to physical reads (i.e. requests for data that isn't currently in the buffer cache and requires a read from the relevant data file on disk).

A write in SQL Server modifies the page in memory; modified pages are marked as dirty and written to disk by asynchronous processes (also what Martin said).

Just to add, all of these figures represent number of pages, not rows.

like image 22
sbowden Avatar answered Nov 20 '22 10:11

sbowden