Contenu connexe Similaire à Materialized Views - Praktischer Einsatz vor und in 12c (20) Materialized Views - Praktischer Einsatz vor und in 12c2. © 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
3. © 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)
4. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Use case 1: Aggregation
-------------------------------------------
5. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Use case 1: Aggregation
-------------------------------------------
6. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Advantages
-------------------------------------------
> performance feature
> query rewrite
> easy confguration
(built-in Oracle feature)
7. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Use case 2: Replication
-------------------------------------------
8. © 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)
9. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Real world example?
10. © 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
11. © 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
14. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Considerations
-------------------------------------------
16. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Options
-------------------------------------------
17. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
COMPLETE REFRESH
20. © 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
21. © 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?
22. © 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
24. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
ROWID: reorganization / truncating of the master
will force a complete refresh
25. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
Change Management
-------------------------------------------
27. © SYNTEGRIS INFORMATION SOLUTIONS GMBH
Materialized Views – Praktischer Einsatz vor und in 12c
OUT_OF_PLACE REFRESH