Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
oracle_exadata_monitoring [2020/12/02 12:13] – andonovj | oracle_exadata_monitoring [2020/12/04 16:20] (current) – andonovj | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Overview===== | =====Overview===== | ||
- | ====Scripts===== | + | =====Scripts===== |
Scripts that are specific to exadata monitoring: | Scripts that are specific to exadata monitoring: | ||
- | ==Cell Usage== | + | ====Cell Usage==== |
- | <sxh> | + | <Code:bash> |
select a.name, b.value/ | select a.name, b.value/ | ||
from v$sysstat a, v$mystat b | from v$sysstat a, v$mystat b | ||
Line 45: | Line 45: | ||
17 rows selected. | 17 rows selected. | ||
- | </sxh> | + | </Code> |
- | ==Check if table is in Flash Cache== | + | ====Flash Cache Content==== |
To see if an object is in the flash cache, we have to know its: | To see if an object is in the flash cache, we have to know its: | ||
Line 54: | Line 54: | ||
* Database name | * Database name | ||
- | <sxh> | + | <Code:bash> |
SQL> @/ | SQL> @/ | ||
SQL> select owner, object_name, | SQL> select owner, object_name, | ||
Line 65: | Line 65: | ||
----- -------------------- | ----- -------------------- | ||
SH CUSTOMERS | SH CUSTOMERS | ||
- | </sxh> | + | </Code> |
once we have that, we can check in the call using the CellCli: | once we have that, we can check in the call using the CellCli: | ||
- | <sxh> | + | <Code:bash> |
CellCLI> list flashcachecontent where objectnumber=20473 and tablespacenumber=7 and dbuniquename=DBM detail | CellCLI> list flashcachecontent where objectnumber=20473 and tablespacenumber=7 and dbuniquename=DBM detail | ||
cachedKeepSize: | cachedKeepSize: | ||
Line 83: | Line 83: | ||
tableSpaceNumber: | tableSpaceNumber: | ||
CellCLI> | CellCLI> | ||
- | </sxh> | + | </Code> |
+ | |||
+ | Furthermore, | ||
+ | |||
+ | < | ||
+ | [celladmin@qr01celadm01 ~]$ dcli -c qr01celadm01, | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm01: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm02: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | qr01celadm03: | ||
+ | </ | ||
+ | |||
+ | In total is 477, just like the SQL query. | ||
+ | |||
+ | ====Smart Scan==== | ||
+ | We can see if a query is using the Smart Scan capabilities of the exadata by observing the execution plan: | ||
+ | |||
+ | < | ||
+ | SQL> connect sh/sh | ||
+ | Connected. | ||
+ | SQL> set autotrace on explain | ||
+ | SQL> | ||
+ | SQL> set timing on | ||
+ | SQL> select count(*) from cust_info where occupation = ' | ||
+ | |||
+ | COUNT(*) | ||
+ | ---------- | ||
+ | | ||
+ | |||
+ | Elapsed: 00: | ||
+ | |||
+ | Execution Plan | ||
+ | ---------------------------------------------------------- | ||
+ | Plan hash value: 1273666552 | ||
+ | |||
+ | ---------------------------------------------------------------------------------------- | ||
+ | |||
+ | | Id | Operation | ||
+ | |||
+ | ---------------------------------------------------------------------------------------- | ||
+ | |||
+ | | 0 | SELECT STATEMENT | ||
+ | |||
+ | | 1 | SORT AGGREGATE | ||
+ | |||
+ | |* 2 | TABLE ACCESS STORAGE FULL| CUST_INFO | | ||
+ | |||
+ | ---------------------------------------------------------------------------------------- | ||
+ | |||
+ | |||
+ | Predicate Information (identified by operation id): | ||
+ | --------------------------------------------------- | ||
+ | |||
+ | 2 - storage(" | ||
+ | | ||
+ | |||
+ | SQL> set autotrace off | ||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | As you can see above, the query is using the: "TABLE ACCESS STORAGE FULL" which is a sign of using the Smart Scan capabilities. | ||
+ | Other indication is the wait time statistics: | ||
+ | |||
+ | < | ||
+ | SQL> @/ | ||
+ | SQL> SELECT DISTINCT event, total_waits, | ||
+ | 2 time_waited/ | ||
+ | 3 FROM V$SESSION_EVENT e, V$MYSTAT s | ||
+ | 4 WHERE event LIKE ' | ||
+ | |||
+ | EVENT TOTAL_WAITS | ||
+ | ---------------------------------------------------------------- ----------- ---------- ------------- | ||
+ | cell single block physical read 93 | ||
+ | cell smart table scan 190 | ||
+ | |||
+ | Elapsed: 00: | ||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | As you can see, the "Cell smart Table scan" takes the majority of the time. (2.59 seconds out of 2.80 seconds) | ||
+ | |||
+ | < | ||
+ | SQL> col event format a35 | ||
+ | SQL> select event, total_waits, | ||
+ | 2 time_waited/ | ||
+ | 3 from v$system_event where event like ' | ||
+ | |||
+ | EVENT | ||
+ | ----------------------------------- ----------- ---------- ------------- | ||
+ | cell smart table scan | ||
+ | cell statistics gather | ||
+ | cell smart file creation | ||
+ | cell single block physical read 13292 41.39 | ||
+ | cell multiblock physical read | ||
+ | cell list of blocks physical read | ||
+ | |||
+ | 6 rows selected. | ||
+ | |||
+ | Elapsed: 00: | ||
+ | SQL> | ||
+ | </Code> |