AI

SQL360 is a specialized performance diagnostic tool designed specifically for Oracle Databases. It is part of the "SQLd360" family and is intended to provide a 360-degree view of a single SQL statement's performance without requiring permanent installations on the database.
Below is an explanation of the core electronic/technical components that make up SQL360.
---
## 1. Core Technical Components
SQL360 operates as a set of scripts that interact with the Oracle Database engine. Its "parts" are divided into the data collection layer and the presentation layer.
| Component | Function | Description |
| :--- | :--- | :--- |
| **SQL Scripts** | Data Collection | A massive collection of `.sql` files that query Data Dictionary views and AWR (Automatic Workload Repository). |
| **PL/SQL Blocks** | Logic Processing | Anonymous blocks used to calculate statistics, generate execution plans, and check for SQL patches/profiles. |
| **Shell/Batch Wrappers** | Execution | `sql360.sh` (Linux) or `sql360.bat` (Windows) that orchestrate the sequence of script execution. |
| **Repository (Flat Files)** | Storage | SQL360 does not use a database schema; it stores collected data in `.txt`, `.csv`, and `.html` files within a zip archive. |
---
## 2. The Data "Parts" (What it collects)
SQL360 breaks down a SQL statement into several technical dimensions. These are the "electronic parts" of the performance report:
### A. Execution Environment
* **Optimizer Settings:** Captures `optimizer_features_enable`, hidden parameters (`_` parameters), and session-level settings.
* **System Statistics:** CPU speed, I/O throughput, and multi-block read counts.
### B. Object Metadata
* **Table/Index Stats:** Last analyzed dates, number of rows, blocks, and column histograms.
* **Structure:** Definitions of indexes, constraints, and partitions involved in the query.
### C. Execution History
* **AWR/ASH Data:** Historical performance trends, wait events, and execution frequency over time.
* **Plan Stability:** Comparison of different execution plans (PHV - Plan Hash Values) to identify performance regressions.
---
## 3. The Output Architecture
The "Electronic Output" of SQL360 is a highly structured HTML interface.
```mermaid
graph TD
A[SQL360 Execution] --> B{Data Extraction}
B --> C[Main HTML Report]
B --> D[Visual Execution Plans]
B --> E[CBO Trace Files]
B --> F[Health Check Alerts]
```
### Key Functional Sections:
1. **Summary:** High-level metrics (Elapsed time, CPU time, Buffer gets).
2. **Plans:** Display of the E-Plan, including Adaptive Plans and Cost-Based Optimizer (CBO) environment.
3. **Observations:** An automated "Health Check" that flags potential issues like "Stale Statistics" or "Cartesian Products."
---
## 4. Operational Requirements
To run the electronic components of SQL360, the environment must meet these criteria:
* **Database Version:** Oracle 10g, 11g, 12c, 18c, 19c, or 21c.
* **Privileges:** `SELECT_CATALOG_ROLE` and `DBMS_METADATA` access.
* **Licensing:** While the tool is free (Open Source), it requires **Oracle Diagnostics and Tuning Packs** if it accesses AWR views.
---
- ⤷
How do I execute SQL360 for a specific SQL_ID?
- ⤷ What is the difference between SQL360 and Oracle's native SQLTXPLAIN?
- ⤷ Does SQL360 require any permanent objects to be created in the database?