Reading and analyzing trace file contents using just SQL
Simple example: tracefiles for the last 5 days: select fc.* from v$diag_trace_file f join v$diag_trace_file_contents fc on f.adr_home=fc.adr_home and f.trace_filename=fc.trace_filename where...
View ArticleOracle diagnostic events — Cheat sheet
Oracle diagnostic events is a great feature, but unfortunately poorly documented and nonintuitive, so it’s difficult to remember all events/actions/parameters and even read its internal documentation...
View ArticleSQL*Plus tips #9: Reading traces and incident files
@tracefile_read_last_by_mask filemask [regexp] [ignore_regexp] – finds last trace by filemask and filters rows by regexp and filters out rows by ignore_regexp: @ tracefile_by_mask.sql [mask] – finds...
View ArticleAnother interesting troubleshooting case
Got an interesting question today in RuOUG: Some very simple PL/SQL procedures usually are completed within ~50ms, but sometimes sporadically longer than a second. For example, the easiest one from...
View ArticleShining some light on Database In-Memory vs the Exadata Columnar Cache in...
I posted a while back on how to use Tracing Hybrid Columnar Compression in an offload server so this is a quick follow up. I have trouble remembering the syntax for setting a regular parameter in an...
View ArticleCorrect syntax for the table_stats hint
A friend contacted me to ask why they were having problems using the table_stats hint to influence optimizer decision making and also to influence the decision to use direct read or buffer cache scan...
View ArticleSmart Scan and Recursive queries
Since Christmas I have been asked to investigate two different “failures to use Smart Scan”. It turns out they both fell into the same little known restriction on the use of Direct Read. Smart Scan...
View ArticleTriaging Smart Scan
This document is my attempt to bring together the available options that can be used to determine the root cause of an issue in order to create a roadmap to help support engineers narrow down the...
View ArticleWhere does the commit or rollback happen in PL/SQL code?
One of the easiest ways is to use diagnostic events: alter session set events 'sql_trace {callstack: fname xctend} errorstack(1)';
View ArticleCBO and Partial indexing
Oracle 12c introduced Partial indexing, which works well for simple partitioned tables with literals. However, it has several significant issues: For instance, consider the following simple...
View Article