3. Human memory is complex Short Term Sensory Store: ~ 1 second uncompressed raw memory Working memory: Limited capacity, requires attention Long term memory: physically stored in brain structure; large capacity; indexed strangely Beyond Bullets Points: By: Cliff Atkinson
4.
5. PGA is used for program working memory such as sorting and hashing
6.
7. What consumes PGA memory Sorts: ORDER BY SORT-MERGE JOIN UNION, INTERSECT, MINUS Pre-10GR2 GROUP BY , DISTINCT Analytic functions: OVER(), LEAD(), LAG(), etc Hash Operations: Hash join Hash GROUP BY, DISTINCT PL/SQL variables Collections BULK COLLECT Parameter passing without NOCOPY
16. Opting out of PGA Aggregate Target Default workarea sizing policies only allow for a session to get 10-20% of the PGA If a single large sort is in progress, it makes sense to “opt out” of automatic workarea sizing
27. Optimizing overall memory Optimizing between PGA and SGA are often more significant than allocating within each area In 10g optimization is difficult: Compare PGA and Buffer Cache advisories Adjust based on IO types (direct read temp vs. physical reads) In 11g can use Automatic Memory Management Risk of thrashing and starvation is greater than with ASMM Set minimum values for all pools Manually configure non-default buffer pools
28. Worst case scenario Trivial memory allocations from PL/SQL programs can steal vital memory from buffer cache Situation can become worse if MTS is enabled Setting minimum values is virtually mandatory
31. 11g Result Set Cache Can provide massive improvements for expensive queries on static tables In memory dynamic materialized view?
32. Result set cache Caveats: Single latch on modifications Any modification to a dependent table flushes the result sets Can select statements only at the table level or by inserting a hint Bottom line: Limited effectiveness Unique candidate SQLs must be low frequency Tables must be static
33. Things we didn’t talk about Shared pool Redo buffer Large Pool Flashback buffer
34. Key take aways Don’t emphasize buffer cache tuning at the expense of PGA Consider opting out of PGA Aggregate Target for large sorts ASMM and ASM are fine, but set minimums for important memory pools Result set cache is promising, but right now is of limited applicability
As a result of this architecture, you can only really expect to take a handful of items out of a powerpoint presentation. I’ll list the take aways at the end....