materialized views - praktischer einsatz vor und in 12c
TRANSCRIPT
www.syntegris.de
Materialized Views – Praktischer Einsatz vor und in 12c
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Syntegris information solutions GmbH
• Mittelständisches IT-Unternehmen
• 40 Mitarbeiter (Berater, Entwickler, Architekten)
• Gründung: 2000
• Sitz: Neu-Isenburg, Hessen
• Oracle Gold Partner mit Spezialisierung für Datenbanken
• Bereiche: Data Warehouse, Business Process Development, Anwendungsentwicklung für Oracle Datenbanken, Administration Oracle/Solaris, Consulting, Schulung
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
What are MVs?
-------------------------------------------
> View: SQL is executed
> Materialized:
result set is stored in a table
> Legacy: snapshot (Oracle 8i)
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Use case 1: Aggregation
-------------------------------------------
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Use case 1: Aggregation
-------------------------------------------
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Advantages
-------------------------------------------
> performance feature
> query rewrite
> easy confguration
(built-in Oracle feature)
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Use case 2: Replication
-------------------------------------------
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Advantages
-------------------------------------------
> mass deployment (templates)
> site – specifc customization
(e.g. timing of refresh)
> connection only during refresh
> easy confguration
(built-in Oracle feature)
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Real world example?
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Chemical Substances
-------------------------------------------
> ordering vials/tubes/plates
differ on each site
> meta data about substances
same on each site
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Chemical Substances
-------------------------------------------
> ordering vials/tubes/plates
differ on each site
> meta data about substances
same on each site
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
GUI
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Considerations
-------------------------------------------
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Code?
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Options
-------------------------------------------
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
COMPLETE REFRESH
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
FAST REFRESH
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
BUILD DEFERRED
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
------------------------------------------
> MV is readable all the time
> Index maintenance per row
> REDO and UNDO
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
------------------------------------------
> tuncate is faster (High Water Mark)
> minimal Index maintenance
> direct path load
> no UNDO and less redo
> MV readable?
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Fast Refresh - Limits
-------------------------------------------
> Use ANSI Join Syntax
> Select ROWIDs when joining
> bulk load operations master table
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
ROWID: reorganization / truncating of the master
will force a complete refresh
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Change Management
-------------------------------------------
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
PREBUILD TABLE
© SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
OUT_OF_PLACE REFRESH
Danke
SYNTEGRIS INFORMATION SOLUTIONS GMBHHERMANNSTRASSE 54-56
63263 NEU-ISENBURG
FON (06102) 29 86 68FAX (06102) 55 88 06