10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2 OFFLOADING / SMART SCAN-------------------------------------------------------------------------------------------| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |-------------------------------------------------------------------------------------------| 0 | SELECT STATEMENT | | | | | 360K(100)| || 1 | SORT AGGREGATE | | 1 | 30 | | | ||* 2 | HASH JOIN | | 64M| 1836M| 549M| 360K (1)| 01:12:02 ||* 3 | TABLE ACCESS STORAGE FULL| SKEW | 16M| 366M| | 44585 (2)| 00:08:56 || 4 | TABLE ACCESS STORAGE FULL| SKEW2| 128M| 732M| | 178K (1)| 00:35:37 |-------------------------------------------------------------------------------------------Predicate Information (identified by operation id):---------------------------------------------------2 - access("S"."PK_COL"="S2"."PK_COL")3 - storage(("S"."COL2"='asddsadasd' AND "S"."COL1">0))filter(("S"."COL2"='asddsadasd' AND "S"."COL1">0))Column Projection Information (identified by operation id):-----------------------------------------------------------1 - (#keys=0) COUNT(LENGTH("S"."COL4"))[22], COUNT("S"."COL1")[22],SUM(LENGTH("S"."COL4"))[22]2 - (#keys=1) "S"."COL4"[VARCHAR2,1], "S"."COL1"[NUMBER,22]3 - "S"."PK_COL"[NUMBER,22], "S"."COL1"[NUMBER,22], "S"."COL4"[VARCHAR2,1]4 - "S2"."PK_COL"[NUMBER,22]33 rows selected.SYS@SANDBOX> select projection from v$sql_plan2 where projection is not null3 and sql_id = '8xa3wjh48b9ar';PROJECTION-------------------------------------------------------------------------------------------(#keys=0) COUNT(LENGTH("S"."COL4"))[22], COUNT("S"."COL1")[22], SUM(LENGTH("S"."COL4"))[22](#keys=1) "S"."COL4"[VARCHAR2,1], "S"."COL1"[NUMBER,22]"S"."PK_COL"[NUMBER,22], "S"."COL1"[NUMBER,22], "S"."COL4"[VARCHAR2,1]"S2"."PK_COL"[NUMBER,22]4 rows selected.So as you can see, the plan output shows the projection information, but only if you use the+PROJECTION argument in the call to the DBMS_XPLAN package. Note also that the PK_COL columns fromboth tables were listed in the PROJECTION section, but that not all columns in the WHERE clause areincluded. Only those columns that need to be returned to the database (join columns) should be listed.Note also that the projection information is not unique to <strong>Exadata</strong> but is a generic part of the databasecode.The V$SQL family of views contain columns that define the volume of data that may be saved byOffloading (IO_CELL_OFFLOAD_ELIGIBLE_BYTES) and the volume of data that was actually returned by thestorage servers (IO_INTERCONNECT_BYTES). Note that these columns are cumulative for all the executionsof the statement. We’ll be using these two columns throughout the book because they are key indicators30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!