SQL Server: Dynamically Calculate Delta Values For Numeric And Date Columns From DMV’s Or Any Table

DMV's are very useful. In fact, they are like glass windows that lets you look at a running engine. There are lots of them and they give us lots of numbers but Most are cumulative in nature!  i.e., the numbers keep on increasing and never decrease. A variation of above like space usage where the … Continue reading SQL Server: Dynamically Calculate Delta Values For Numeric And Date Columns From DMV’s Or Any Table

Oracle System & Session Wait Big Picture Analysis- Using RATIO_TO_REPORT Function

Numbers and meaning it comes to numbers, the easiest way to get a point across to majority of the people is to express something in terms of percentage. Let us consider an example where a query produces the “waits” Oracle experienced overall in terms of “Number of waits” and the “Time waited”. This produces: WAIT_CLASS … Continue reading Oracle System & Session Wait Big Picture Analysis- Using RATIO_TO_REPORT Function

Oracle/SQL Server – RANK, DENSE_RANK and ROW_NUMBER Analytic Functions – Basic Examples

Note: The illustrations on this post are done with Oracle. However, by making minor changes, you should be able to run it on SQL Server and the concepts remain the same. Please refer this post for changes needed. RANK, DENSE_RANK and ROW_NUMBER are three powerful analytic functions that every database developer should be thoroughly familiar … Continue reading Oracle/SQL Server – RANK, DENSE_RANK and ROW_NUMBER Analytic Functions – Basic Examples