SlideShare une entreprise Scribd logo
1  sur  60
Marco Gralike
Management Consultant 
• Ordina, The Netherlands 
• Oracle 20+ years experience 
• Oracle ACE Director (www.xmldb.nl)
What do we use in the 
database…
VARCHAR NVARCHAR NUMBER INTEGER FLOAT DECIMAL CHAR VARCHAR2 
NVARCHAR2 NCHAR VARYING VARCHAR DATE REAL DOUBLE PRECISION 
UNSIGNED BINARY INTEGER(8) UNSIGNED BINARY INTEGER(16) UNSIGNED 
BINARY INTEGER(32)SIGNED BINARY INTEGER(8)SIGNED BINARY 
INTEGER(16)SIGNED BINARY INTEGER(32)POINTER BINARY ROWID RAW CHAR 
BINARY_FLOAT BINARY FLOAT BINARY DOUBLE LONG RAW LONG UB2 LONG 
SB4 MLSLABEL XMLTYPE (TABLE or REF) BINARY_DOUBLE PL/SQL REF 
CURSOR UROWID KOKED1 KOTTBX KOTTB KOTMI KOTMD KOTADX KOTAD KOTTD 
KOKED REF CLOB BLOB BFILE TYPE (USER-DEFINED) TYPE (TABLE OF 
RECORD) TYPE (VARRAY) CFILE TIME TIME WITH TZ TIMESTAMP TIMESTAMP 
WITH TZ INTERVAL YEAR TO MONTH INTERVAL DAY TO SECOND NAMED 
COLLECTION NAMED OBJECT TIMESTAMP WITH LOCAL TZ OCTET SMALLINT 
VARYING ARRAY TABLE PL/SQL RECORD PL/SQL COLLECTION PL/SQL 
BOOLEAN OID CONTIGUOUS ARRAY CANONICALLOB POINTER PL/SQL POSITIVE 
PL/SQL POSITIVEN PL/SQL ROWID PL/SQL LONG PL/SQL LONG RAW PL/SQL 
BINARY INTEGER PL/SQL PLS INTEGER PL/SQL NATURAL PL/SQL NATURALN 
PL/SQL STRING...
Datatype moto: 
If incorrect datatype you will have a decrease in performance or 
you get the incorrect results ( if you are lucky 8))...
*) The In-Memory Maria Option
What can we do in XMLType 
land… (fast recap / intro)
Unstructured 
XMLIndex 
Structured 
XMLIndex 
Structured 
XMLIndex 
XML Text Index 
paragraph 
book 
title author author 
whitepaper 
title author id 
content 
bookstore 
chapter 
content
Unstructured 
XMLIndex 
f (x) 
Path Table
Structured 
XMLIndex 
f (x) 
Content 
Tables
CREATE INDEX LINEITEMS_XI 
ON PURCHASEORDER_T_BIN (XML_COLUMN) 
INDEXTYPE IS "XDB"."XMLINDEX" 
PARAMETERS (' GROUP LINEITEMS_GROUP 
XMLTABLE LINEITEM_SXI_T 
(inmemory memcompress for query priority critical) 
''/PurchaseOrder/LineItems/LineItem'' 
COLUMNS 
lineitem VARCHAR2(30) PATH ''@ItemNumber'', 
description VARCHAR2(100) PATH ''Part/@Description'', 
partid VARCHAR2(30) PATH ''Part'', 
unitprice VARCHAR2(30) PATH ''Part/@UnitPrice'', 
quantity VARCHAR2(30) PATH ''Quantity'' 
');
Unstructured 
XMLIndex 
Structured 
XMLIndex 
Structured 
XMLIndex 
XML Text Index 
paragraph 
book 
title author author 
whitepaper 
title author id 
content 
bookstore 
chapter 
content
Parallelization 
XMLType  12.1
Setup
10.000 
45263
In Memory / XML Storage Tests 
 CLOB – Securefile 
 XMLType – Securefile Binary XML 
 XMLType – Securefile Binary XML (XSD) 
 XMLType – Object Relational (XSD – Default) 
 XMLType – Object Relational (XSD – Out of line XML)
SQL> alter table PURCHASEORDER_T 
inmemory memcompress for query priority critical; 
SQL> alter table LINEITEMS_T 
inmemory memcompress for query priority critical; 
SQL> create TABLE... 
inmemory memcompress for query priority critical; 
SQL> create INDEX ... INDEXTYPE IS "XDB"."XMLINDEX" 
inmemory memcompress for query priority critical;
In Memory / XML Index Tests 
 Securefile Binary XML - In Memory Structured Index 
 Securefile Binary XML (XSD) – In Memory Structured Index 
 Object Relational (XSD – Default) 
 Object Relational (XSD – Out of line XML)
In Memory / XML Query’s 
“Arbitrary queries” 
 Query 1 - Touching PurchaseOrder and LineItems 
 Query 2 - Touching PurchaseOrder and LineItems & group/count 
 Query 3 - Touching LineItems elements and attributes only
Findings & Graphics…
SQL> SELECT * 
FROM XMLTABLE 
('for $i in fn:collection("oradb:/IM/PURCHASEORDER_T”) 
/PurchaseOrder[ CostCenter = $CC 
and Requestor = $REQUESTOR 
and count(LineItems/LineItem) > $QUANTITY 
]/Reference 
RETURN $i 
' 
passing 'A60' as "CC" 
, 'Diana Lorentz' as "REQUESTOR" 
, 5 as "QUANTITY" 
);
COLUMN_VALUE 
------------------------------------------------------- 
<Reference>DLORENTZ-20120411133920295PDT</Reference> 
<Reference>DLORENTZ-20120206180918983PST</Reference> 
<Reference>DLORENTZ-20121219144418724PST</Reference> 
<Reference>DLORENTZ-20120710194550792PDT</Reference> 
<Reference>DLORENTZ-20120723165626922PDT</Reference> 
<Reference>DLORENTZ-20120728151113368PDT</Reference> 
<Reference>DLORENTZ-20120602200119333PDT</Reference> 
<Reference>DLORENTZ-20120513165042874PDT</Reference> 
... 
...
varray, nested table (default)
out of line
*) Unoptimized XML construct 
detected 
(enable XMLOptimizationCheck for 
more information)
*) Collection Iterator Pickler Fetch 
XMLSEQUENCEFROMXMLTYPE 
XQSEQUENCEFROMXMLTYPE
*) Tracing ORA-19022 
SET XMLOptimizationCheck ON 
Event = “19027 trace name context forever, level 0x2000” 
Event = “10053 trace name context forever, level 1”
SQL> SELECT t1.Country 
, t2.Part 
, min(t2.Quantity) as quantity 
, count(*) as occurrence 
FROM PURCHASEORDER_T_X pt 
, XMLTABLE('/PurchaseOrder' 
PASSING pt.{xmltype} 
COLUMNS 
Country PATH 'ShippingInstructions/Address/country', 
x_lineitems XMLTYPE PATH 'LineItems/LineItem' ) t1 
, XMLTABLE(’*' 
PASSING t1.x_lineitems 
COLUMNS 
Part PATH 'Part', 
Quantity PATH 'Quantity' ) t2 
WHERE t1.Country is NOT NULL 
AND t1.Country = 'United Kingdom' 
HAVING count(*) >= 10 
GROUP BY t1.Country, t2.Part 
ORDER BY t1.Country;
COUNTRY PART QUANTITY OCCURRENCE 
--------------- ------------ -------- ---------- 
United Kingdom 56775022792 1 11 
United Kingdom 43396799493 1 10 
United Kingdom 717951000866 1 10 
United Kingdom 13023046696 1 11 
United Kingdom 25192024825 1 10 
5 rows selected.
SQL> SELECT lines.lineitem, 
lines.description, 
lines.partid, 
lines.unitprice, 
lines.quantity 
FROM purchaseorder_t pt, 
XMLTable('/PurchaseOrder/LineItems/LineItem' 
PASSING xmltype_table_or_column 
COLUMNS 
lineitem PATH '@ItemNumber', 
description PATH 'Part/@Description', 
partid PATH 'Part', 
unitprice PATH 'Part/@UnitPrice', 
quantity PATH 'Quantity’ 
) lines;
LINEITEM DESCRIPTION PARTID UNITPRICE QTY 
-------- ------------------------------------------ ----------- --------- --- 
2 The Longest Yard 97360870848 27,95 5 
1 Babe / Babe- Pig In the City 25192141621 19,95 4 
3 Down to You 71795100742 19,95 3 
2 I Spy: Tag, You're It 14381983920 19,95 4 
4 Dragon Fist 43396071711 19,95 3 
1 Multiplicity 43396824492 19,95 9 
4 Things You Can Tell Just By Looking At Her 27616859198 19,95 3 
... 
... 
45263 rows selected
SQL> SELECT lines.lineitem, 
lines.description, 
lines.partid, 
lines.unitprice, 
lines.quantity 
FROM purchaseorder_t pt, 
XMLTable('/PurchaseOrder/LineItems/LineItem' 
PASSING xmltype_table_or_column 
COLUMNS 
LINES_RNO FOR ORDINALITY, 
lineitem PATH '@ItemNumber', 
description PATH 'Part/@Description', 
partid PATH 'Part', 
unitprice PATH 'Part/@UnitPrice', 
quantity PATH 'Quantity’ 
) lines;
Recap…
• In-Memory Column Store can achieve extra performance 
• In-Memory Column Store can be applied selectively (column) 
• Optimization possible – “RID” (for ordinality) 
• Optimizer XML Costs not yet on par (costs <> timings) 
• “Old rules-of-thumb” for XMLType still apply

Contenu connexe

Tendances

BGOUG 2012 - XML Index Strategies
BGOUG 2012 - XML Index StrategiesBGOUG 2012 - XML Index Strategies
BGOUG 2012 - XML Index StrategiesMarco Gralike
 
Hotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured DataHotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured DataMarco Gralike
 
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1Marco Gralike
 
Oracle Database - JSON and the In-Memory Database
Oracle Database - JSON and the In-Memory DatabaseOracle Database - JSON and the In-Memory Database
Oracle Database - JSON and the In-Memory DatabaseMarco Gralike
 
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2Marco Gralike
 
XML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured dataXML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured dataMarco Gralike
 
XFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in thereXFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in thereMarco Gralike
 
Introduction to SQL (for Chicago Booth MBA technology club)
Introduction to SQL (for Chicago Booth MBA technology club)Introduction to SQL (for Chicago Booth MBA technology club)
Introduction to SQL (for Chicago Booth MBA technology club)Jennifer Berk
 
XML In The Real World - Use Cases For Oracle XMLDB
XML In The Real World - Use Cases For Oracle XMLDBXML In The Real World - Use Cases For Oracle XMLDB
XML In The Real World - Use Cases For Oracle XMLDBMarco Gralike
 
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...Marco Gralike
 
Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Scott Leberknight
 
Jdbc 4.0 New Features And Enhancements
Jdbc 4.0 New Features And EnhancementsJdbc 4.0 New Features And Enhancements
Jdbc 4.0 New Features And Enhancementsscacharya
 
whats New in axapta 2012
whats New in axapta 2012whats New in axapta 2012
whats New in axapta 2012H B Kiran
 
Json in 18c and 19c
Json in 18c and 19cJson in 18c and 19c
Json in 18c and 19cstewashton
 
Object Relational Mapping in PHP
Object Relational Mapping in PHPObject Relational Mapping in PHP
Object Relational Mapping in PHPRob Knight
 
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)Faysal Shaarani (MBA)
 

Tendances (20)

BGOUG 2012 - XML Index Strategies
BGOUG 2012 - XML Index StrategiesBGOUG 2012 - XML Index Strategies
BGOUG 2012 - XML Index Strategies
 
Hotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured DataHotsos 2013 - Creating Structure in Unstructured Data
Hotsos 2013 - Creating Structure in Unstructured Data
 
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 1
 
Oracle Database - JSON and the In-Memory Database
Oracle Database - JSON and the In-Memory DatabaseOracle Database - JSON and the In-Memory Database
Oracle Database - JSON and the In-Memory Database
 
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
OPP2010 (Brussels) - Programming with XML in PL/SQL - Part 2
 
XML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured dataXML Amsterdam - Creating structure in unstructured data
XML Amsterdam - Creating structure in unstructured data
 
XFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in thereXFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in there
 
Introduction to SQL (for Chicago Booth MBA technology club)
Introduction to SQL (for Chicago Booth MBA technology club)Introduction to SQL (for Chicago Booth MBA technology club)
Introduction to SQL (for Chicago Booth MBA technology club)
 
XML In The Real World - Use Cases For Oracle XMLDB
XML In The Real World - Use Cases For Oracle XMLDBXML In The Real World - Use Cases For Oracle XMLDB
XML In The Real World - Use Cases For Oracle XMLDB
 
Polyglot Persistence
Polyglot PersistencePolyglot Persistence
Polyglot Persistence
 
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
 
Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0Cloudera Impala, updated for v1.0
Cloudera Impala, updated for v1.0
 
Jdbc 4.0 New Features And Enhancements
Jdbc 4.0 New Features And EnhancementsJdbc 4.0 New Features And Enhancements
Jdbc 4.0 New Features And Enhancements
 
Xml
XmlXml
Xml
 
whats New in axapta 2012
whats New in axapta 2012whats New in axapta 2012
whats New in axapta 2012
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Json in 18c and 19c
Json in 18c and 19cJson in 18c and 19c
Json in 18c and 19c
 
Object Relational Mapping in PHP
Object Relational Mapping in PHPObject Relational Mapping in PHP
Object Relational Mapping in PHP
 
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
Load & Unload Data TO and FROM Snowflake (By Faysal Shaarani)
 
wtf is in Java/JDK/wtf7?
wtf is in Java/JDK/wtf7?wtf is in Java/JDK/wtf7?
wtf is in Java/JDK/wtf7?
 

Similaire à UKOUG Tech14 - Using Database In-Memory Column Store with Complex Datatypes

Working With XML in IDS Applications
Working With XML in IDS ApplicationsWorking With XML in IDS Applications
Working With XML in IDS ApplicationsKeshav Murthy
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStoreMariaDB plc
 
Query optimizer vivek sharma
Query optimizer vivek sharmaQuery optimizer vivek sharma
Query optimizer vivek sharmaaioughydchapter
 
Postgres Performance for Humans
Postgres Performance for HumansPostgres Performance for Humans
Postgres Performance for HumansCitus Data
 
Java Data Migration with Data Pipeline
Java Data Migration with Data PipelineJava Data Migration with Data Pipeline
Java Data Migration with Data PipelineNorth Concepts
 
Big data analytics with Spark & Cassandra
Big data analytics with Spark & Cassandra Big data analytics with Spark & Cassandra
Big data analytics with Spark & Cassandra Matthias Niehoff
 
A Divine Data Comedy
A Divine Data ComedyA Divine Data Comedy
A Divine Data ComedyMike Harris
 
23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...
23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...
23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...Amazon Web Services
 
Big Data Analytics with MariaDB ColumnStore
Big Data Analytics with MariaDB ColumnStoreBig Data Analytics with MariaDB ColumnStore
Big Data Analytics with MariaDB ColumnStoreMariaDB plc
 
A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013Connor McDonald
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lalit009kumar
 
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_103 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1mlraviol
 
hive HBase Metastore - Improving Hive with a Big Data Metadata Storage
hive HBase Metastore - Improving Hive with a Big Data Metadata Storagehive HBase Metastore - Improving Hive with a Big Data Metadata Storage
hive HBase Metastore - Improving Hive with a Big Data Metadata StorageDataWorks Summit/Hadoop Summit
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Keshav Murthy
 
How to use Parquet as a basis for ETL and analytics
How to use Parquet as a basis for ETL and analyticsHow to use Parquet as a basis for ETL and analytics
How to use Parquet as a basis for ETL and analyticsJulien Le Dem
 

Similaire à UKOUG Tech14 - Using Database In-Memory Column Store with Complex Datatypes (20)

Working With XML in IDS Applications
Working With XML in IDS ApplicationsWorking With XML in IDS Applications
Working With XML in IDS Applications
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
Query optimizer vivek sharma
Query optimizer vivek sharmaQuery optimizer vivek sharma
Query optimizer vivek sharma
 
Dbms &amp; oracle
Dbms &amp; oracleDbms &amp; oracle
Dbms &amp; oracle
 
Postgres Performance for Humans
Postgres Performance for HumansPostgres Performance for Humans
Postgres Performance for Humans
 
Java Data Migration with Data Pipeline
Java Data Migration with Data PipelineJava Data Migration with Data Pipeline
Java Data Migration with Data Pipeline
 
PO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - SqlPO WER - Piotr Mariat - Sql
PO WER - Piotr Mariat - Sql
 
Bcp
BcpBcp
Bcp
 
Sql
SqlSql
Sql
 
Big data analytics with Spark & Cassandra
Big data analytics with Spark & Cassandra Big data analytics with Spark & Cassandra
Big data analytics with Spark & Cassandra
 
A Divine Data Comedy
A Divine Data ComedyA Divine Data Comedy
A Divine Data Comedy
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...
23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...
23 October 2013 - AWS 201 - A Walk through the AWS Cloud: Introduction to Ama...
 
Big Data Analytics with MariaDB ColumnStore
Big Data Analytics with MariaDB ColumnStoreBig Data Analytics with MariaDB ColumnStore
Big Data Analytics with MariaDB ColumnStore
 
A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013A few things about the Oracle optimizer - 2013
A few things about the Oracle optimizer - 2013
 
Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02Lecture05sql 110406195130-phpapp02
Lecture05sql 110406195130-phpapp02
 
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_103 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
03 2017Emea_RoadshowMilan-WhatsNew-Mariadbserver10_2andmaxscale 2_1
 
hive HBase Metastore - Improving Hive with a Big Data Metadata Storage
hive HBase Metastore - Improving Hive with a Big Data Metadata Storagehive HBase Metastore - Improving Hive with a Big Data Metadata Storage
hive HBase Metastore - Improving Hive with a Big Data Metadata Storage
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.
 
How to use Parquet as a basis for ETL and analytics
How to use Parquet as a basis for ETL and analyticsHow to use Parquet as a basis for ETL and analytics
How to use Parquet as a basis for ETL and analytics
 

Plus de Marco Gralike

UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxUKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxMarco Gralike
 
eProseed Oracle Open World 2016 debrief - Oracle Management Cloud
eProseed Oracle Open World 2016 debrief - Oracle Management CloudeProseed Oracle Open World 2016 debrief - Oracle Management Cloud
eProseed Oracle Open World 2016 debrief - Oracle Management CloudMarco Gralike
 
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 DatabaseeProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 DatabaseMarco Gralike
 
UKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database APIUKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database APIMarco Gralike
 
Ordina Oracle Open World
Ordina Oracle Open WorldOrdina Oracle Open World
Ordina Oracle Open WorldMarco Gralike
 
An introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xAn introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xMarco Gralike
 
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3Marco Gralike
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)Marco Gralike
 
Flexibiliteit & Snel Schakelen
Flexibiliteit & Snel SchakelenFlexibiliteit & Snel Schakelen
Flexibiliteit & Snel SchakelenMarco Gralike
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesMarco Gralike
 
BGOUG 2012 - Drag & drop and other stuff - Using your database as a file server
BGOUG 2012 - Drag & drop and other stuff - Using your database as a file serverBGOUG 2012 - Drag & drop and other stuff - Using your database as a file server
BGOUG 2012 - Drag & drop and other stuff - Using your database as a file serverMarco Gralike
 
BGOUG 2012 - Design concepts for xml applications that will perform
BGOUG 2012 - Design concepts for xml applications that will performBGOUG 2012 - Design concepts for xml applications that will perform
BGOUG 2012 - Design concepts for xml applications that will performMarco Gralike
 
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File ServerUKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File ServerMarco Gralike
 
Design Concepts For Xml Applications That Will Perform
Design Concepts For Xml Applications That Will PerformDesign Concepts For Xml Applications That Will Perform
Design Concepts For Xml Applications That Will PerformMarco Gralike
 

Plus de Marco Gralike (15)

UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptxUKOUG2018 - I Know what you did Last Summer [in my Database].pptx
UKOUG2018 - I Know what you did Last Summer [in my Database].pptx
 
eProseed Oracle Open World 2016 debrief - Oracle Management Cloud
eProseed Oracle Open World 2016 debrief - Oracle Management CloudeProseed Oracle Open World 2016 debrief - Oracle Management Cloud
eProseed Oracle Open World 2016 debrief - Oracle Management Cloud
 
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 DatabaseeProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
 
UKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database APIUKOUG Tech15 - Going Full Circle - Building a native JSON Database API
UKOUG Tech15 - Going Full Circle - Building a native JSON Database API
 
Ordina Oracle Open World
Ordina Oracle Open WorldOrdina Oracle Open World
Ordina Oracle Open World
 
An introduction into Oracle VM V3.x
An introduction into Oracle VM V3.xAn introduction into Oracle VM V3.x
An introduction into Oracle VM V3.x
 
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
An introduction into Oracle Enterprise Manager Cloud Control 12c Release 3
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
 
Flexibiliteit & Snel Schakelen
Flexibiliteit & Snel SchakelenFlexibiliteit & Snel Schakelen
Flexibiliteit & Snel Schakelen
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use Cases
 
BGOUG 2012 - Drag & drop and other stuff - Using your database as a file server
BGOUG 2012 - Drag & drop and other stuff - Using your database as a file serverBGOUG 2012 - Drag & drop and other stuff - Using your database as a file server
BGOUG 2012 - Drag & drop and other stuff - Using your database as a file server
 
BGOUG 2012 - Design concepts for xml applications that will perform
BGOUG 2012 - Design concepts for xml applications that will performBGOUG 2012 - Design concepts for xml applications that will perform
BGOUG 2012 - Design concepts for xml applications that will perform
 
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File ServerUKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
 
Amis ACE
Amis ACEAmis ACE
Amis ACE
 
Design Concepts For Xml Applications That Will Perform
Design Concepts For Xml Applications That Will PerformDesign Concepts For Xml Applications That Will Perform
Design Concepts For Xml Applications That Will Perform
 

Dernier

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

UKOUG Tech14 - Using Database In-Memory Column Store with Complex Datatypes

  • 2. Management Consultant • Ordina, The Netherlands • Oracle 20+ years experience • Oracle ACE Director (www.xmldb.nl)
  • 3. What do we use in the database…
  • 4. VARCHAR NVARCHAR NUMBER INTEGER FLOAT DECIMAL CHAR VARCHAR2 NVARCHAR2 NCHAR VARYING VARCHAR DATE REAL DOUBLE PRECISION UNSIGNED BINARY INTEGER(8) UNSIGNED BINARY INTEGER(16) UNSIGNED BINARY INTEGER(32)SIGNED BINARY INTEGER(8)SIGNED BINARY INTEGER(16)SIGNED BINARY INTEGER(32)POINTER BINARY ROWID RAW CHAR BINARY_FLOAT BINARY FLOAT BINARY DOUBLE LONG RAW LONG UB2 LONG SB4 MLSLABEL XMLTYPE (TABLE or REF) BINARY_DOUBLE PL/SQL REF CURSOR UROWID KOKED1 KOTTBX KOTTB KOTMI KOTMD KOTADX KOTAD KOTTD KOKED REF CLOB BLOB BFILE TYPE (USER-DEFINED) TYPE (TABLE OF RECORD) TYPE (VARRAY) CFILE TIME TIME WITH TZ TIMESTAMP TIMESTAMP WITH TZ INTERVAL YEAR TO MONTH INTERVAL DAY TO SECOND NAMED COLLECTION NAMED OBJECT TIMESTAMP WITH LOCAL TZ OCTET SMALLINT VARYING ARRAY TABLE PL/SQL RECORD PL/SQL COLLECTION PL/SQL BOOLEAN OID CONTIGUOUS ARRAY CANONICALLOB POINTER PL/SQL POSITIVE PL/SQL POSITIVEN PL/SQL ROWID PL/SQL LONG PL/SQL LONG RAW PL/SQL BINARY INTEGER PL/SQL PLS INTEGER PL/SQL NATURAL PL/SQL NATURALN PL/SQL STRING...
  • 5. Datatype moto: If incorrect datatype you will have a decrease in performance or you get the incorrect results ( if you are lucky 8))...
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. *) The In-Memory Maria Option
  • 12. What can we do in XMLType land… (fast recap / intro)
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Unstructured XMLIndex Structured XMLIndex Structured XMLIndex XML Text Index paragraph book title author author whitepaper title author id content bookstore chapter content
  • 18. Unstructured XMLIndex f (x) Path Table
  • 19.
  • 20.
  • 21. Structured XMLIndex f (x) Content Tables
  • 22.
  • 23. CREATE INDEX LINEITEMS_XI ON PURCHASEORDER_T_BIN (XML_COLUMN) INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS (' GROUP LINEITEMS_GROUP XMLTABLE LINEITEM_SXI_T (inmemory memcompress for query priority critical) ''/PurchaseOrder/LineItems/LineItem'' COLUMNS lineitem VARCHAR2(30) PATH ''@ItemNumber'', description VARCHAR2(100) PATH ''Part/@Description'', partid VARCHAR2(30) PATH ''Part'', unitprice VARCHAR2(30) PATH ''Part/@UnitPrice'', quantity VARCHAR2(30) PATH ''Quantity'' ');
  • 24. Unstructured XMLIndex Structured XMLIndex Structured XMLIndex XML Text Index paragraph book title author author whitepaper title author id content bookstore chapter content
  • 26. Setup
  • 27.
  • 29. In Memory / XML Storage Tests  CLOB – Securefile  XMLType – Securefile Binary XML  XMLType – Securefile Binary XML (XSD)  XMLType – Object Relational (XSD – Default)  XMLType – Object Relational (XSD – Out of line XML)
  • 30. SQL> alter table PURCHASEORDER_T inmemory memcompress for query priority critical; SQL> alter table LINEITEMS_T inmemory memcompress for query priority critical; SQL> create TABLE... inmemory memcompress for query priority critical; SQL> create INDEX ... INDEXTYPE IS "XDB"."XMLINDEX" inmemory memcompress for query priority critical;
  • 31. In Memory / XML Index Tests  Securefile Binary XML - In Memory Structured Index  Securefile Binary XML (XSD) – In Memory Structured Index  Object Relational (XSD – Default)  Object Relational (XSD – Out of line XML)
  • 32. In Memory / XML Query’s “Arbitrary queries”  Query 1 - Touching PurchaseOrder and LineItems  Query 2 - Touching PurchaseOrder and LineItems & group/count  Query 3 - Touching LineItems elements and attributes only
  • 34.
  • 35. SQL> SELECT * FROM XMLTABLE ('for $i in fn:collection("oradb:/IM/PURCHASEORDER_T”) /PurchaseOrder[ CostCenter = $CC and Requestor = $REQUESTOR and count(LineItems/LineItem) > $QUANTITY ]/Reference RETURN $i ' passing 'A60' as "CC" , 'Diana Lorentz' as "REQUESTOR" , 5 as "QUANTITY" );
  • 36. COLUMN_VALUE ------------------------------------------------------- <Reference>DLORENTZ-20120411133920295PDT</Reference> <Reference>DLORENTZ-20120206180918983PST</Reference> <Reference>DLORENTZ-20121219144418724PST</Reference> <Reference>DLORENTZ-20120710194550792PDT</Reference> <Reference>DLORENTZ-20120723165626922PDT</Reference> <Reference>DLORENTZ-20120728151113368PDT</Reference> <Reference>DLORENTZ-20120602200119333PDT</Reference> <Reference>DLORENTZ-20120513165042874PDT</Reference> ... ...
  • 37. varray, nested table (default)
  • 38.
  • 40. *) Unoptimized XML construct detected (enable XMLOptimizationCheck for more information)
  • 41. *) Collection Iterator Pickler Fetch XMLSEQUENCEFROMXMLTYPE XQSEQUENCEFROMXMLTYPE
  • 42. *) Tracing ORA-19022 SET XMLOptimizationCheck ON Event = “19027 trace name context forever, level 0x2000” Event = “10053 trace name context forever, level 1”
  • 43.
  • 44. SQL> SELECT t1.Country , t2.Part , min(t2.Quantity) as quantity , count(*) as occurrence FROM PURCHASEORDER_T_X pt , XMLTABLE('/PurchaseOrder' PASSING pt.{xmltype} COLUMNS Country PATH 'ShippingInstructions/Address/country', x_lineitems XMLTYPE PATH 'LineItems/LineItem' ) t1 , XMLTABLE(’*' PASSING t1.x_lineitems COLUMNS Part PATH 'Part', Quantity PATH 'Quantity' ) t2 WHERE t1.Country is NOT NULL AND t1.Country = 'United Kingdom' HAVING count(*) >= 10 GROUP BY t1.Country, t2.Part ORDER BY t1.Country;
  • 45. COUNTRY PART QUANTITY OCCURRENCE --------------- ------------ -------- ---------- United Kingdom 56775022792 1 11 United Kingdom 43396799493 1 10 United Kingdom 717951000866 1 10 United Kingdom 13023046696 1 11 United Kingdom 25192024825 1 10 5 rows selected.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. SQL> SELECT lines.lineitem, lines.description, lines.partid, lines.unitprice, lines.quantity FROM purchaseorder_t pt, XMLTable('/PurchaseOrder/LineItems/LineItem' PASSING xmltype_table_or_column COLUMNS lineitem PATH '@ItemNumber', description PATH 'Part/@Description', partid PATH 'Part', unitprice PATH 'Part/@UnitPrice', quantity PATH 'Quantity’ ) lines;
  • 52. LINEITEM DESCRIPTION PARTID UNITPRICE QTY -------- ------------------------------------------ ----------- --------- --- 2 The Longest Yard 97360870848 27,95 5 1 Babe / Babe- Pig In the City 25192141621 19,95 4 3 Down to You 71795100742 19,95 3 2 I Spy: Tag, You're It 14381983920 19,95 4 4 Dragon Fist 43396071711 19,95 3 1 Multiplicity 43396824492 19,95 9 4 Things You Can Tell Just By Looking At Her 27616859198 19,95 3 ... ... 45263 rows selected
  • 53.
  • 54.
  • 55.
  • 56.
  • 57. SQL> SELECT lines.lineitem, lines.description, lines.partid, lines.unitprice, lines.quantity FROM purchaseorder_t pt, XMLTable('/PurchaseOrder/LineItems/LineItem' PASSING xmltype_table_or_column COLUMNS LINES_RNO FOR ORDINALITY, lineitem PATH '@ItemNumber', description PATH 'Part/@Description', partid PATH 'Part', unitprice PATH 'Part/@UnitPrice', quantity PATH 'Quantity’ ) lines;
  • 58.
  • 60. • In-Memory Column Store can achieve extra performance • In-Memory Column Store can be applied selectively (column) • Optimization possible – “RID” (for ordinality) • Optimizer XML Costs not yet on par (costs <> timings) • “Old rules-of-thumb” for XMLType still apply