By Gowthami | apps-dba.com | Oracle Exadata Series
If you work with Oracle Exadata, one of the most transformative features you will encounter is Smart Scan. It is the engine behind Exadata's legendary query acceleration, and understanding it deeply is essential for any Oracle DBA working in Exadata environments. In this post, we will break down exactly how Smart Scan works, when it activates, how to verify it, and how to tune your environment to get the most out of it.
📘 Oracle Exadata – The Complete Guide
Want to master every aspect of Exadata — Smart Scan, Storage Indexes, Hybrid Columnar Compression, and more? Get the definitive reference written for Oracle DBAs.
Get the Book on Gumroad →What is Smart Scan?
Smart Scan is Exadata's ability to offload SQL processing — specifically full table scans and index range scans — directly to the Exadata Storage Cells. Instead of the database server reading all data blocks and filtering them in the database layer, Exadata pushes the filter predicates, column projections, and even joins down to the storage cells. Only the relevant rows and columns are returned to the database tier.
This is a radical departure from traditional Oracle storage architecture, where storage is "dumb" — it only reads and returns blocks. Exadata storage cells are intelligent processing units running Cellsrv software that understands SQL predicates.
How Smart Scan Works – Step by Step
- Predicate Offloading: Oracle sends the WHERE clause predicates down to each storage cell.
- Column Projection: Only the columns referenced in the SELECT list are returned — not all columns in the table.
- Row Filtering at Storage: Each cell evaluates predicates row by row and discards non-matching rows before sending data back.
- Parallel Processing: Multiple storage cells process different data segments simultaneously in parallel.
- IB Network Transfer: Only the filtered, projected result set travels over the InfiniBand network to the database server.
Prerequisites for Smart Scan to Activate
| Condition | Detail |
|---|---|
| Full Table Scan or Fast Full Index Scan | Smart Scan only works with these access paths — not regular index range scans |
| Direct Path Read | The segment must be read via direct path (bypassing buffer cache). Happens automatically for large objects on Exadata. |
| Object on Exadata Storage | The table must reside on ASM diskgroups backed by Exadata storage cells |
| Cell Offload Compatible SQL | Not all SQL constructs can be offloaded. Complex PL/SQL functions may prevent offloading. |
Verifying Smart Scan is Active
1. Check Cell Physical IO Statistics
SELECT name, value FROM v$mystat s, v$statname n WHERE s.statistic# = n.statistic# AND n.name IN ( 'cell physical IO interconnect bytes', 'cell physical IO interconnect bytes returned by smart scan', 'physical read total bytes' ) ORDER BY name;
2. Execution Plan – Storage Predicate
EXPLAIN PLAN FOR SELECT /*+ FULL(e) */ department_id, SUM(salary) FROM employees e WHERE hire_date > DATE '2020-01-01' GROUP BY department_id; SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
Look for "storage" in the Predicate Information section — this indicates predicate pushdown to storage cells.
What Prevents Smart Scan?
- Small tables – Oracle may cache them in buffer cache rather than use direct path reads
- Index access paths – Regular B-tree index range scans do not trigger Smart Scan
- Non-offloadable SQL functions – User-defined PL/SQL functions in WHERE clauses cannot be pushed to cells
- Cell offload disabled – The parameter
cell_offload_processingis set to FALSE (default is TRUE)
Forcing or Disabling Smart Scan
-- Disable Smart Scan for current session ALTER SESSION SET cell_offload_processing = FALSE; -- Re-enable ALTER SESSION SET cell_offload_processing = TRUE; -- Check current setting SELECT name, value FROM v$parameter WHERE name = 'cell_offload_processing';
Smart Scan and Storage Indexes
Smart Scan works hand-in-hand with Storage Indexes — an Exadata-only feature that maintains in-memory min/max value ranges for each 1MB storage region. Before performing a Smart Scan, Exadata consults storage indexes to skip entire 1MB storage regions that cannot possibly contain matching rows. This further reduces I/O dramatically.
Summary
Smart Scan is one of the most powerful features that distinguishes Exadata from conventional Oracle deployments. By pushing filter and projection processing down to the storage cells, it enables massive reductions in data movement and dramatically accelerates analytical queries and large table scans.
📘 Go Deeper with the Complete Exadata Reference
Oracle Exadata: The Complete Guide covers Smart Scan, Storage Indexes, Hybrid Columnar Compression, Exadata networking, performance tuning, and much more in exhaustive detail. Written by a practising Oracle DBA for DBAs.
📥 Get Your Copy on Gumroad →Tags: Oracle Exadata, Smart Scan, Exadata Performance, Oracle DBA, Cell Offload
No comments:
Post a Comment