technology: oracle exadata - global access...

4
TECHNOLOGY: Oracle Exadata As Published In May/June 2011

Upload: truonghanh

Post on 30-Jan-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TECHNOLOGY: Oracle Exadata - Global Access …globleat.com/wp-content/uploads/2013/02/Smart_Scans_Meet_Storage... · Next Steps READ more about the Oracle Exadata oracle.com/us/products/database/database-machine

TECHNOLOGY: Oracle Exadata

As Published In

May/June 2011

Page 2: TECHNOLOGY: Oracle Exadata - Global Access …globleat.com/wp-content/uploads/2013/02/Smart_Scans_Meet_Storage... · Next Steps READ more about the Oracle Exadata oracle.com/us/products/database/database-machine

Smart Scans Meet Storage Indexes By Arup Nanda

Understand how Oracle Exadata uses storage indexes to speed I/O.

The Oracle Exadata Database Machine brings database performance to a whole new level,

but have you ever wondered what exactly makes it so fast? Several components of the

Oracle Exadata Database Machine, such as Oracle Database 11g Release 2; Oracle

Exadata’s Smart Flash Cache, Hybrid Columnar Compression, and SmartScan features; and

InfiniBand interconnect, help deliver high performance. One of the key technologies that

supports this performance is the storage index, which is not a regular database index.

Storage indexes reside in the memory of the storage servers—also called storage cells—and

significantly reduce unnecessary I/O by excluding irrelevant database blocks in the storage

cells. This article shows you how storage indexes work and how to make sure they are used

effectively.

Traditional Database I/O

Computational power in the form of CPU capability and memory has increased

exponentially in the last several decades, whereas the power of the storage subsystem has

not increased nearly as much. There are many reasons why storage performance has not

improved with CPU and memory performance, and physics is one of them. A disk can spin

only so fast, and each platter in the disk array can hold only a finite amount of information,

so the current weakest link in the processing chain will continue to be storage and will

account for the biggest part of compute response time.

Consider what happens when a user issues the following query against an Oracle Database

instance that is not running on Oracle Exadata: select avg(amt) from sales where cust_level = 3.

Assume there is no index on the cust_level column, meaning that the optimizer will choose

a full table scan for this query. The Oracle Database server process corresponding to the

session will issue a request to get all the database blocks of the sales table from the storage,

examine the data, and discard the rows that do not satisfy the query. (When a row is

requested by Oracle Database, that entire database block—typically 8 KB in size—has to

go into memory from disk.)

The storage subsystem is concerned with bits and bytes—it does not have any idea about

the actual data stored inside the database blocks. The database server alone can determine

what data is in what blocks.

Oracle Exadata I/O and Smart Scan

Storage in Oracle Exadata changes query processing so that not all blocks have to go to the

database server for that server to determine which rows might satisfy a query. Oracle

Exadata’s Smart Scan feature enables certain types of query processing to be done in the

storage cell. With Smart Scan technology, the database nodes send query details to the

storage cells via a protocol known as iDB (Intelligent Database). With this information, the

storage cells can take over a large portion of the data-intensive query processing. Oracle

Exadata storage cells can search storage disks with added intelligence about the query and

send only the relevant bytes, not all the database blocks, to the database nodes—hence the

term smart scan.

With Oracle Exadata, full table scans with selected functions and operators such as =, >,

and so on in predicates and index fast full scans can use smart scans. To see functions that

can benefit from Smart Scan, you can issue the query select name from v$sqlfn_metadata

Storage Index

While scanning storage, Oracle Exadata storage cells can identify which areas of the disk

storage will definitely not contain the values the query is interested in and avoid reading

Page 3: TECHNOLOGY: Oracle Exadata - Global Access …globleat.com/wp-content/uploads/2013/02/Smart_Scans_Meet_Storage... · Next Steps READ more about the Oracle Exadata oracle.com/us/products/database/database-machine

Next Steps READ more about the Oracle Exadata

oracle.com/us/products/database/database-machine

A Technical Overview of the Oracle Exadata Database Machine and Exadata

Storage Server (pdf)

Cover Feature: Bring Business Online

The results may surprise you. The I/O savings attributable to storage indexes is 0; that is,

storage indexes were not used. However, you can see from the “Smart Scan” statistic that a

smart scan reduced the I/O significantly—to just 0.9 MB (from a table that contains a few

hundred gigabytes of data).

But why wasn’t the storage index used? Because the values of the sales_dt column of the

sales table are randomly spread over the blocks of the table, with almost all blocks

containing rows that satisfy where sales_dt = '13-MAR-11'

The storage index, even if used, would not have been able to reduce the I/O, because it

would have identified all the blocks as potentially satisfying the query, resulting in no I/O

savings.

To remedy that situation, you can increase the likelihood that more matching rows will be

found in fewer database blocks so that Oracle Exadata storage indexes find fewer blocks to

send to the database server nodes. You can do that by reloading the table, ordered by the

sales_dt column. Here are the SQL statements: SQL> rename sales to sales_old; SQL> create table sales nologging as select * from sales_old where 1=2; SQL> insert /*+ APPEND */ into sales select * from sales_old order by sales_dt;

Now issue the query against the sales table: select avg(amt) from sales where sales_dt = '13-MAR-11';

Checking the metrics by executing the code in Listing 1, I can see that 434 MB of I/O was

saved with the storage indexes: STAT_NAME STAT_VALUE ————————————— ————————————— SI Savings 434.0045 Smart Scan 0.0012

Conclusion

Storage indexes in Oracle Exadata know the distribution of data in storage cells and help

eliminate physical I/O within storage cells during a smart scan. This significant reduction in

I/O results in even faster processing of data within the Oracle Exadata Database Machine.

You can check to see whether storage indexes are being used in Oracle Exadata queries,

and you can measure the I/O savings in a specific query.

Page 4: TECHNOLOGY: Oracle Exadata - Global Access …globleat.com/wp-content/uploads/2013/02/Smart_Scans_Meet_Storage... · Next Steps READ more about the Oracle Exadata oracle.com/us/products/database/database-machine

E-mail this page Printer View

Hardware and Software, Engineered to Work Together

A r u p N a n d a H e a d s h o t

Arup Nanda ([email protected]) has been an Oracle DBA for more than 14 years,

handling all aspects of database administration, from performance tuning to security and

disaster recovery. He was Oracle Magazine’s DBA of the Year in 2003.

Send us your comments