1

As part of extended events I track rpc_completed and sql_batch_completed events. It is to catch all the queries hitting the db so I have a better understanding of the traffic. Based on that I would like to split application into two groups: read and read-write. The read ones I could move later to the read-only AG nodes for the performance reasons. My question is what is the best way to do that? I can see the Wrties field which at the first sight looks like what I am after. I have done some tests and it looks fine, i can see that for the insert/delete/update statements, the value in this column is greater than 0 when for selects it is 0.

Do you know of any pitfalls of fully depending on that field? Could you recommend another way of dealing with that task?

Update: Do you know what is the definition of the writes field for sql_batch_completed or rpc_completed? enter image description here

I couldn't find it. Is it the same as for profiler? Per this thread Making sense of the number of reads/writes in SQL Profiler it is:

Writes: Number of logical write I/Os issued by the user during the connection.

Kind regards, Rafal

Raf_123_
  • 11
  • 3

0 Answers0