Scripts
Oracle: Find Tables with Outdated Statistics via DBA_TABLES
Jul 1, 2025 / · 3 min read · dba_tables oracle database dba statistics performance monitoring sql tuning dbms_output ·Oracle Database Query: Find Tables with Outdated Statistics Purpose This Oracle Database query helps database administrators monitor the progress of table statistics collection by identifying tables that have analyze dates older than the current date. It's particularly useful when running large-scale ANALYZE operations …
Read MoreShow a Count of Analyzed Tables Broken Down by Schema in Oracle Database Purpose: This post explains how to use Oracle SQL to report the total number of tables and the number of analyzed tables for each schema in your Oracle Database. This is crucial for database administrators who want to monitor the health and …
Read MoreOracle PLAN_TABLE Setup and EXPLAIN PLAN Usage Guide
Jun 29, 2025 / · 4 min read · oracle database sql performance optimization explain-plan query-tuning dba dbms_xplan ·What is the Oracle PLAN_TABLE and how do you use it? Oracle's PLAN_TABLE is a fundamental component for SQL performance analysis and query optimization. This comprehensive guide explores the setup, usage, and best practices for leveraging Oracle's execution plan functionality to optimize database performance. SQL Code …
Read MoreOracle ANALYZE Statement: Old-Style Table and Index Statistics Collection The ANALYZE statement in Oracle Database is a legacy tool used to collect statistics on tables and indexes. These statistics help the database optimizer make decisions about the most efficient way to execute SQL queries. Although Oracle now …
Read MoreExport/Import Oracle Optimizer Statistics: Complete Guide
Apr 29, 2025 / · 3 min read · Oracle Database Query Optimization DBA Tools Statistics Management dbms_stats import export statistics ·Oracle Optimizer Statistics Transfer Guide This guide demonstrates how to migrate schema statistics between Oracle databases using DBMS_STATS procedures - crucial for maintaining consistent execution plans across environments. Exporting and importing optimizer statistics in Oracle Database is essential for maintaining …
Read MoreOracle DBMS_STATS: Delete Database Statistics
Jan 16, 2025 / · 3 min read · Oracle Database Performance Tuning SQL Database Administration Statistics Management DBMS_STATS ·Oracle Database: Deleting Statistics with DBMS_STATS Package Deleting optimizer statistics leaves a table with none, and the optimizer then falls back to dynamic statistics: it samples a few table blocks at parse time. The DBMS_STATS package has one delete procedure for each level, from the whole database down to a …
Read MoreOracle DBMS_STATS.GATHER_SYSTEM_STATS for Query Tuning
Jan 15, 2025 / · 2 min read · Oracle Database Performance Tuning SQL Database Administration Query Optimization GATHER_SYSTEM_STATS DBMS_STATS ·Optimizing Oracle Database Performance with GATHER_SYSTEM_STATS Oracle Database's DBMS_STATS package is a powerful tool for gathering and managing database statistics. This post focuses on the GATHER_SYSTEM_STATS procedure, which is crucial for optimizing query performance by collecting system-level statistics. …
Read MoreOracle Statistics Gathering with DBMS_STATS Explained
Understanding Oracle Database Statistics Gathering: A Comprehensive Guide Purpose DBA_TAB_STATISTICS is the view that shows what the optimizer knows about each table: the number of rows, the average row length and the number of data blocks. DBMS_STATS is the package that fills those numbers in. The optimizer reads them …
Read MoreOracle DBMS_STATS: Gather Schema and Table Statistics
Dec 11, 2024 / · 8 min read · Database Management Performance Optimization dbms_stats.gather_schema_stats dbms_stats ·Optimizing Performance with Oracle Database: Gathering Schema and Table Statistics Purpose Automatic optimizer statistics collection runs by itself inside the maintenance windows. Manual DBMS_STATS calls run when you decide, on the objects you choose, with the options you set. The SQL Tuning Guide names a different …
Read MoreIdentifying Oracle Database Hot Blocks Using v$system_event
Oct 1, 2024 / · 2 min read · oracle-database performance-tuning sql troubleshooting optimization v$system_event v$segment_statistics ·Identifying Oracle Database Hot Blocks using Oracle Table v$system_event: A Comprehensive Guide Purpose Understanding Hot Blocks In an Oracle database, a "hot block" refers to a data block in the buffer cache that experiences a disproportionately high volume of concurrent requests. This contention can lead to …
Read More