1 copyright © 2012, oracle and/or its affiliates. all …...• on exadata half rac: • 34.75...
TRANSCRIPT
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 2
Real Life Applications of Location Analytics Dan Geringer, Senior Software Development Manager, Oracle Jayant Sharma, Director Prod Mgmt, Oracle
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 3
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 4
Program Agenda
Introducing Oracle Spatial and Graph
Some Use Cases
Discussion
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 5
INTRODUCING
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 6
Why rename this Oracle Database option
Highlights existing graph capabilities in Oracle Spatial – W3C RDF graph since Oracle 10gR2 – Network Data Model graph since Oracle 10gR1
Addresses increasing market demand for graph database capabilities – Social Network Graph database popularity – Multimodal and integrated transportation, utility and communications
networks
From “Oracle Spatial” to “Oracle Spatial and Graph”
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 7
Oracle Spatial and Graph
“Points” “Lines” “Polygons”
Rasters
Topologies
3D f1 f2 n1 n2
e1 e2 e3
e4
Network Graphs
Web Services (OGC)
Geocoding Routing
RDF Semantic Graphs
Oracle Spatial and Graph option
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 8
Spatial Data Types and Models
– 2D and 3D Geometries
– Raster Imagery and Gridded Data
– Land Management Persistent Topology
– Geographic and Whole Earth (Geodetic)
– Network Data Model Graph
Spatial Analysis
– Spatial Search (Containment & Proximity)
– Geocoding (Address conversion)
– Routing (Turn by Turn directions)
– Indexing of 2D & 3D
– Full Coordinate System Support
Spatial Features
Oracle Spatial and Graph option
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 9
Network Data Model graph
W3C RDF Semantic graph
Graph Features
Oracle Spatial and Graph option
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 10
Agenda
Introduction
Some Use Cases
Discussion
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 11
Display application content and context
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 12
Reports in operational applications
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 13
Use in operational workflows Network Pinning and Work Tagging
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 14
Spatial visualization in interactive reports
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 15
Map views in BI dashboards
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 16
Show incidents by type
– within or near specified location
Public safety
Usage Scenarios in (public sector) CRM
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 17
Usage Scenarios in (public sector) CRM Show KPIs by service district
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 18
Geomarketing examples
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 19
TMC: Oracle SiteHub & Retail Analytics
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 20
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 21
Sales by store
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 22
Members who shopped at selected store
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 23
Where do the frequent customers live
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 24
Reports/analysis using drive-time polygons
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 25
Or by custom (user-drawn) areas
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 26
Solution architecture
GeoDatawarehouse Schema Table
J2EE Container
JDBC
Oracle DBMS 11.2
Oracle WLS
Client (browser)
IsoChrone Area Editing
IsoChrone OBI-Report
Get the analysis area
BI Publisher
NDM WithinCost Analysis
MapViewer Polygon Editing
Jsp
SDO_Geom Package (Intersection, Union, Difference ..)
Bridge GeoBI Package
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 27
OVERVIEW
Comprehensive cloud based GIS analytics platform
Provide rich data and cutting edge analytics to help clients acquire, retain and grow high value customers
CHALLENGES / OPPORTUNITIES • Ensure enterprise level security needs • Provide mechanism for efficient and optimal data transfer • Fast query response times for large customer and
transaction level datasets • Frequent, transparent software and data updates • Quick and easy set up
SOLUTION • Oracle Database 11g Release 2 Enterprise Edition
• Spatial Option with GeoRaster, Network Data Model • Partitioning • Advanced Security
• Oracle Fusion Middleware 11g • MapViewer
RESULTS • Up to10x performance improvement for detailed
mapping with the use of MapViewer map cache • Use of NDM partitioned blobs resulted in 300% quicker
isochrone creation times while increasing accuracy • Consolidation of raster, vector, network data in 500 GB
sized central repository • Utilize topology to maintain accurate geography
relationships • Improved base data precision with 25M+ ZIP4 level data
TARGUSinfo ElementOne Analytics
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 28
SDO_LRS to build comprehensive road network
SDO_NET partitioning and load-on-demand for scalability and performance
NDM APIs for custom costs and path analysis
Features used
Use of Spatial LRS & Network Data Model
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 29
SDO_CS for transformations buffer, union, difference,
convexhull etc for polygon generation
sdo_validate, simplify, rectify_geom for cleansing
sdo_tin for heatmaps
Advanced functions
Use of Oracle Spatial 11gR2 Features
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 30
Same underlying data for geocoder and road network
Customers geocode as link id and percentage (instead of longitude/latitude)
5 mile Network Buffer generates all possible paths
Each persisted path includes: – Covered link IDs, nodes ID, and associated
costs
Single database query to find closest store, and drive time, for each customer (join on link_id)
For millions of customers, find closest store within a specified drive time
Large Scale Drive Time/Distance Analysis
Store Location
Customer Location
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 31
Benefits with Parallel Query, Exadata Database Machine
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 32
Parallel Query and Spatial Rail Application
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 33
Parallel Query And Spatial Operators
Requirement – GPS locations for each train collected throughout the day – Each location has other attributes (time, speed, and more) – GPS locations have a degree of error, so they don’t always fall on a track. – Bulk nearest neighbor queries to find closest track, and project reported
train positions onto tracks
This information is used for: – Tracking trains – Analysis for maintenance, ensure engineers are within parameters,etc…
Rail Application
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 34
Parallel Query And Spatial Operators
45,158,800 GPS train positions. For each train position:
Find the closest track to the train (with SDO_NN) Then calculate the position on the track closest to
the train
What we tested
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 35
Parallel Query And Spatial Operators Rail Application
ALTER SESSION FORCE PARALLEL ddl PARALLEL 72; ALTER SESSION FORCE PARALLEL query PARALLEL 72;
CREATE TABLE results NOLOGGING SELECT /*+ ordered index (b tracks_spatial_idx) */ a.locomotive_id, sdo_lrs.find_measure (b.track_geom, a.locomotive_pos) FROM locomotives a, tracks b WHERE sdo_nn (b.track_geom, a.locomotive_pos, 'sdo_num_res=1') ='TRUE';
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 36
Parallel Query And Spatial Operators
• On Exadata Half RAC: • 34.75 hours serially vs. 44.1 minutes in parallel • 48 database cores - 47x faster
• On Exadata X2-2 Full Rack • 96 database cores – about 94x faster
• X2-8 (128 cores) even faster
Exadata Results
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 37
Parallel Query and Spatial Validation Of Home Appraisals
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 38
Validation Of Home Appraisals
Validate home appraisals for a Government Sponsored Enterprise (GSE)
Requirement - Find all the parcels touching parcels to validate appraisals
Processed 2,018,429 parcels – Exadata ½ RAC:
Serially – 38.25 minutes Parallel - 48 cores (45x faster) - 50 seconds
– Exadata X2-2 Full RAC (96 cores) about 90x faster – Exadata X2-8 (128 cores) even faster
Exadata Results
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 39
Parallel Query and Spatial Parallel Enabled Pipeline Table Functions
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 40
Parallel Enabled Pipeline Table Function
Parallelize a function that’s called a massive amount of times. – Batch geocoding (sdo_gcdr.geocode_address) – Batch reverse geocoding (sdo_gcdr.reverse_geocode) – Batch Digital Elevation Model (DEM) raster lookups
(sdo_geor.get_cell_value) Pipeline Table Function returns a table of results
– Table of geocodes – Table of reverse geocodes – Table of elevation values
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 41
Parallel Enabled Pipeline Table Function
Define cursor that selects the input to the batch process: – SELECT customer_addresses
FROM address_table WHERE state = ‘NY’;
– SELECT vehicle_location FROM vehicles WHERE sdo_anyinteract (location,:region) = ‘TRUE’
Parallel Query distributes the batch process over a specified number of database cores.
How does it work?
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 42
Parallel Enabled Pipeline Table Function
ALTER SESSION FORCE PARALLEL DML PARALLEL 24; ALTER SESSION FORCE PARALLEL QUERY PARALLEL 24; -- To balance parallel slaves across nodes. ALTER SESSION SET "_parallel_load_balancing"=false;
CREATE TABLE results (id NUMBER, geom SDO_GEOMETRY);
INSERT /*+ append */ INTO results SELECT id, sdo_geometry (2001,8307,sdo_point_type(longitude,latitude,null),null,null) geom FROM table( geocode_pipelined ( CURSOR(SELECT id, streetname, city, state, zip, housenum FROM ascii_addrs) )); COMMIT;
Exadata ¼ RAC has 2 nodes, each with 12 cores (24 cores total)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 43
Parallel Enabled Pipeline Table Function
ALTER SESSION FORCE PARALLEL DML PARALLEL 48; ALTER SESSION FORCE PARALLEL QUERY PARALLEL 48;
CREATE TABLE results (id NUMBER, geom SDO_GEOMETRY); INSERT /*+ append */ INTO results SELECT id, sdo_geometry (2001,8307,sdo_point_type(longitude,latitude,null),null,null)
geom FROM table( geocode_pipelined ( CURSOR(SELECT id, streetname, city, state, zip, housenum FROM ascii_addrs) )); COMMIT;
To Maximize Exadata ¼ RAC (24 cores)
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 44
Parallel Pipelined Table Function
Exadata ¼ RAC Has 24 Cores
Batch geocoding – 1365/second Batch reverse geocoding – 3388/second Batch DEM get_cell_value raster lookups – 8951/second
Exadata Results
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 45
Q&A