Martin Pinner
Martin Pinner DBmarlin Co-founder & Chief architect.

What is statement zero?

What is statement zero?

Every product has its quirks and statement 0 is one of DBmarlin’s. In this article we will look at what it is and why you should pay attention to it.

When you look at the Database Activity screen in DBmarlin, for all intents and purposes it looks like it is displaying a list of statements. By and large it is but occasionally you will see a statement with a hash value of 0 and no text. What is this?

I will let you in on a little secret. Activity is really a session-based view. The majority of things that a session waits on are statements of course. But a session could also be waiting on other things such as writing to the log file, waiting for checkpoint completion, replication and so on. These may appear belonging to a commit statement but sometimes there is no associated statement.

Example statement 0 in Oracle showing that the session is waiting on ‘Log file sync’

Example statement 0 in Oracle showing that the session is waiting on ‘Log file sync’

Once you know the wait-event(s) associated with statement 0, you can click through to the DBmarlin knowledge-base to read more about what they mean and what can be done to reduce them.

It is important that these session waits are addressed. You may need a larger log buffer and faster log devices, for example. This will give you an across-the-board performance improvement, without the need to touch or tune any statements.

So watch out for statement 0!

Ready to try DBmarlin?

If you would like to find out more about DBmarlin and why we think it is special, try one of the links below.

dbmarlin-g2-review