Oracle Exadata is the equivalent of a F1 car in terms of performance but are you sure your application is driving it at its full potential? A simple "lift&shift" approach to Exadata migration might lose significant opportunities for improvements. This session highlights a few example where making little changes dramatically changed the application performance
3. Very partial list of Exa-specific features
• Some are more advertised
– Smart Scan (since 11.1)
– Hybrid Columnar Compression (11.2.1.2)
– Smart Flash Cache (11.2.1.2)
– Smart Flash Log (11.2.2.4)
• Some are less
– Columnar Flash Caching (12.1.2.1.0)
– Smart Block Transfer (12.1.2.2.0)
1/29/17 3
4. Exadata is a F1 car
• ”Smart” features solve many old issues
– Very large I/O bandwidth
• Lots of CPU and memory available
• Exadata is basically a supercar
• But do you drive it at its full potential?
– Do your SQLs fully leverage Exadata?
1/29/17 4
7. Driving lesson #1 - Memo
• Smart Scan is your friend J
– Opens the door to extremely powerful scan
– Requires Full Scan and Direct Path Reads
• That you spent 20y trying to avoid!!!
– Doesn’t work for objects mostly in memory
• IMPQ, ABTC, Full DB Caching
– Doesn’t work for every object
• Cluster tables, IOT, orascn/rowdependencies, etc (*)
1/29/17 7
8. Driving lesson #2 - Memo
• CBO has no specific intelligence for Exadata
– Same formulas, algorithms and params as before
• That you spent 20y tweaking to avoid full scans
– Won’t favor Exadata features explicitly (*)
• Might need a little push to get more Exa-friendly
– Exadata system statistics help a bit
1/29/17 8
9. Example of simple drop-in
Analytical SQL on large dataset (Exa SW ON/OFF)
select cust_gender, calendar_week_number,
sum(amount_sold), sum(quantity_sold)
from countries, -- from SH schema
sales_big, -- ~2.5B rows
customers, -- from SH schema
times -- from SH schema
where sales_big.cust_id = customers.cust_id
and sales_big.time_id = times.time_id
and customers.country_id = countries.country_id
and countries.country_name = 'Italy'
and calendar_quarter_desc = '2001-02'
group by cust_gender, calendar_week_number;
1/29/17 9
28. 12c, drop-in vs Exa-friendly
Drop-in
Exa-friendly
1/29/17 28
cell pIO bytes eligible for pred offload 83886137344
cell pIO bytes saved by storage index 0
cell pIO inter bytes ret by smart scan 14740392
cell pIO bytes eligible for pred offload 83886137344
cell pIO bytes saved by storage index 31303966720
cell pIO inter bytes ret by smart scan 9241000
30. 12c, drop-in vs Exa-friendly
Drop-in
Exa-friendly
1/29/17 30
cell pIO bytes eligible for pred offload 103534297088
cell pIO bytes saved by storage index 0
cell pIO inter bytes ret by smart scan 5985839720
cell pIO bytes eligible for pred offload 103534297088
cell pIO bytes saved by storage index 81859526656
cell pIO inter bytes ret by smart scan 950385176
33. So far we learned
• Clean your CBO environment
– Let the CBO do its job J
• Filter sooner to process less later
– Help the CBO if needed
• Applies to
– Joins -> Bloom Filters
– Subqueries -> Unnest+BF or precompute subq
– Complex pred -> simplify or super-set pred
• Old concept, indexes serve same purpose
1/29/17 33
43. Drop-in surprise #2
• Usually because of
– Large UPD causing chained rows
– Tables with > 255 cols in different AU
• Chained rows are processed
– In the cell if next piece available (less likely)
• chained rows processed by cell
– In the compute node if not (more likely)
• chained rows skipped by cell
• Some fixes (e.g. 9373758) try to minimize impact
1/29/17 43
45. Drop-in surprise #3
• Uncommited changes
– Smart Scan returns data needs CR to compute
• Not Exadata specific
– Just push work back to compute
• For commited changes MINSCN cache helps
– cell blocks helped by minscn optimization
1/29/17 45
46. Conclusion
• Drop-in migration often sub-optimally use Exadata
• Legacy SQLs may need adjustments:
– To fully leverage Exadata features
– To improve areas where Exadata doesn’t automatically help
• Most of the adjustments are simple:
– Clean CBO environment
– Streamline filter predicates
• Sometimes CBO needs a little push
• Get familiar with Smart Scan disablers
– To predict behaviors and avoid surprises
1/29/17 46