In my last blog post we have seen how we can easily collect general MySQL status information using the sys.diagnostics() procedure. What about a single session/thread ? Is there built-in way to easily trace a target thread/session activity (ex: transactions/ statements/stage/wait events) like using an oracle SQL trace ?
Has MySQL a built-in way to easily take a look at the overall server status without the need to execute many different custom query or program ? Maybe something similar to an oracle AWR report ?
Here is the event mapping files for the new oracle 19c
As usual this include new added/removed events :
19c on the left/18c on the right
As i showed in my previous blog post this event mapping files can be used in different use cases.Such as flame graph annotation :
Oracle 19c is finally out with some great features but sadly many of them are not available in Oracle Enterprise Edition
I started by looking at the SQL Quarantine feature in my last blog post and as stated it will not work if you are on Oracle EE. So what’s the next step ?
What this core oracle function is about ? Here is a little script that we can use to extract further information about a specific oracle kernel function which might help us in that process (Beside the usual way , another tool in your toolbox 🙂 ).
Which columns are rely tracked by oracle to grantee write consistency and if needed trigger a DML restart when using the default statement-level consistency ?
Sometimes you may see strange ,unexpected behavior and write consistency bugs because not all the columns that are supposed to be tracked ,are really tracked !
Just check the following articles :
A bug from 2011 (still there in 18c) : http://db-blog.web.cern.ch/blog/franck-pachot/2018-09-oracle-write-consistency-bug-and-multi-thread-de-queuing
A Bug from 2006 (still there in 12.2) : http://blog.sqlora.com/en/merge-and-ora-30926-part-2-or-differences-in-write-consistency-between-update-and-merge/
So how to know it the columns that are supposed to be tracked really are ? I’m going only to treat UPDATE and MERGE statement here.