Professional Documents
Culture Documents
• In-Memory Option
• How it works
• Virtual Columns, join groups
• SQL, Dictionary, and Optimizer Enhancements
• New Functions and Syntax
• Approximate and First n Rows
• SQLPlus Improvements
• PDB Improvements
• Hot Clone
• Memory Management
• New Partitioning Features
• Sharding Capabilities
• The ‘Horizontal’ Database
© 2018 SolarWinds Worldwide, LLC. All rights reserved.
Memory – In The Beginning…
• 9i - SGA_MAX_SIZE
• Memory could grow/shrink
• DB_CACHE_SIZE
• No more DB_BLOCK_BUFFERS
• 10g - Automatic Shared Memory Management (ASMM)
• SGA_TARGET
• Set minimum values for
• Data Cache, Large Pool
• Shared Pool, Java Pool
• 11g - MEMORY_TARGET (AMM)
• Sets SGA + PGA size together
• Can still control minimum sizes - e.g., PGA_AGGREGATE_LIMIT (new in 12c)
• 12c - INMEMORY_SIZE
• Set the size of IN-MEMORY Column Store
© 2018 SolarWinds Worldwide, LLC. All rights reserved.
12c In-Memory Option
http://www.oracle.com/technetwork/database/in-memory/overview/twp-oracle-database-in-memory-2245633.pdf
• In compressed format
• Saves space
• Can scan or filter compressed data
• Only decompressed when used in the result set
CREATE TABLE test (c1 NUMBER, c2 NUMBER, c3 CLOB)
INMEMORY MEMCOMPRESS FOR QUERY NO INMEMORY(c3),
INMEMORY MEMCOMPRESS FOR CAPACITY HIGH (c2);
• DBMS_COMPRESSION (advisor)
• Now supports IM compression
© 2018 SolarWinds Worldwide, LLC. All rights reserved.
IM – Why So Fast
• IM Storage Indexes
• Automatically created and maintained on each column in the column store
• Allow pruning to occur based on filter predicates in the query
• Keeps track of min/max values for each column in an IMCU
• Helps to avoid scans of IM column store
• New in 12.2 - In-Memory Expressions
• Materialize commonly used expressions
• Prevents re-computation for every row
• Are derived values that take advantage of IM
• Can be done in one of 2 ways
• Expression Statistics Store(ESS) automatically stores top 20 popular expressions
• Manage with DBMS_INMEMORY_ADMIN package
• Set with INMEMORY_EXPRESSIONS_USAGE parameter
• In-Memory Virtual Columns
• Needs INMEMORY_VIRTUAL_COLUMNS parameter set to ENABLED or MANUAL
© 2018 SolarWinds Worldwide, LLC. All rights reserved.
IM - How To Use It
• Objects must have the INMEMORY attribute to use the IM column store
• Can be tablespace, table, (sub)partition or materialized view
• To view objects in column store – see V$IM_SEGMENTS, V$IM_COLUMN_LEVEL, any V$IM% views
• No IM IM
•
• In-Memory Joins
• Bloom Filters (10g)
• Transforms join into a filter if there are filtering predicates
• Can be used in column format via SIMD vector processing
• New in 12.2 – Join Groups
• Can be used when there are no filtering predicates
• Allow join columns from multiple tables to share a single compression dictionary
• Hash joins don’t have to decompress the data first
• View join groups in USER_JOINGROUPS
• View shared dictionary in v$IM_SEGDICT
No IM
Columnar Encodings
Leveraged
• 12.1
• FETCH FIRST n ROWS ONLY
• Retrieves first rows without scanning everything
• Faster
• OFFSET n ROWS FETCH FIRST n ROWS ONLY
• Skip some number of rows
95% accurate
Why is it exact?
Need to
set both
99.68% accurate
• Obsolete
• OPTIMIZER_ADAPTIVE_FEATURES
EXEC DBMS_STATS.SET_GLOBAL_PREFS('AUTO_STAT_EXTENSIONS','ON')
• Read-only partitions
• Useful for old partitions
• Use READ ONLY
• READ WRITE (default)
• Can use CTAS or ALTER
• Benefits of Sharding
• Linear scalability for performance and capacity
• Eliminates single points of failure
• Nothing is shared
• Geographical distribution of data
• Data is closer to consumers (e.g. Facebook)
• Satisfies regulatory requirements
• Simplifies Cloud Deployment
• Easy to do rolling upgrades
• Examples of Companies
• Online payment systems
• Regulatory requirements
• Airline ticketing systems
• Social media companies http://www.oracle.com/technetwork/database/availability/oraclesharding-whitepaper
• Shard Catalog
• An Oracle database that centralizes management of a SDB
• Supports automated shard deployment
• Handles multi-shard queries
• Holds master copy of duplicated table
• Shard Directors
• Network listeners which route connections based on a sharding key
• Connection pools can act as shard directors for pooled connections
• Global service
• An extension of database services for the SDB
• Management Interfaces
• GDSCTL (command-line utility) and OEM
To install, download
Oracle Database 12c Release 2 :
linuxx64_12201_database.zip
Oracle Database 12c Release 2 Global Service Manager :
linuxx64_12201_gsm.zip
https://docs.oracle.com/database/122/ADMIN/sharding-overview
© 2018 SolarWinds Worldwide, LLC. All rights reserved.
Summary
www.solarwinds.com/dpa-download/
The SolarWinds, SolarWinds & Design, Orion, and THWACK trademarks are the exclusive
property of SolarWinds Worldwide, LLC or its affiliates, are registered with the U.S.
Patent and Trademark Office, and may be registered or pending registration in other
countries. All other SolarWinds trademarks, service marks, and logos may be common
law marks or are registered or pending registration. All other trademarks mentioned
herein are used for identification purposes only and are trademarks of (and may be
registered trademarks) of their respective companies.