cancel
Showing results for 
Search instead for 
Did you mean: 

What is included in the database-level DiskWrite property?

Breck_Carter
Participant
1,834

Just the number of physical index and table pages written by actual checkpoint operations?

Is there any I/O optimization; e.g., predictive writes prior to a final checkpoint?

Does DiskWrite include anything else?

Physical temporary file pages?

OUTPUT statements?

UNLOAD statements?

xp_write_file()?

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkCulp
Participant

There is only two places in SQLA that the DiskWrite database counter is incremented. They are:

  • after the completion of a database page disk write to any of the dbspaces, including temp and (transaction and mirror) logs
  • after the completion of a group write (i.e. multiple pages) to any of the dbspaces.

So the counter does not include any writes to any auxiliary files such as unload, xp_write_file, etc (nor output... but this is done by the dbisql[c] client!)

Regarding your question "Is there any I/O optimization?". Yes, prior to a checkpoint a pass over the cache is made to flush dirty pages before the database is locked (from connections) to do the actual checkpoint.

Breck_Carter
Participant
0 Kudos

> any of the dbspaces, including temp

That makes sense...

> and logs

...but what about the LogWrite property?

MarkCulp
Participant

Sorry, by "logs" I was referring to the transaction log and mirror log, not the console log, etc. I've clarified my answer. LogWrite refers to the number of writes made to the transaction log and is a subset of DiskWrite.