SlideShare a Scribd company logo
Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
MySQL 8.0: GIS — Are you ready?
Norvald H. Ryeng
Software Engineer
Pre-FOSDEM MySQL Day 2017
4Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Safe Harbor Statement
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.
5Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Agenda
GIS basics
What's new in MySQL 8.0?
What can I do now to prepare for what's
coming?
1
2
3
4
5
6
7
6Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
“The early days of GIS were very lonely.
No-one knew what it meant.”
— Roger Tomlinson, “Father of GIS”
7Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
GIS basics: Geometries (= geometric objects)
● Geometry
– Point
– LineString
– Polygon
– GeometryCollection
● MultiPoint
● MultiLineString
● MultiPolygon
11Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
GIS basics: Spatial reference systems
SRID 0 Projected SRS Geographic SRS
Cartesian SRS
5.7 8.0
12Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
GIS basics: Spatial reference systems
● Each SRS has a unique spatial reference system ID (SRID)
– Numeric identifier
– No formal standard/catalog of SRIDs
– De facto standard: EPSG Dataset
● 4326 = WGS 84 (“GPS coordinates”)
● 3857 = WGS 84 / World Mercator (“Web Mercator”)
● A property of each geometry
● Mixing geometries in different SRIDs in one computation
doesn't make sense and will raise an error (also in 5.7)
13Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
“Geography is just physics slowed down,
with a couple of trees stuck in it.”
— Terry Pratchett in The Last Continent
14Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
What's new in MySQL 8.0
● Geography
– Earth is round(ish)
– Lines are not straight
– The coordinate system wraps: -180, 180]⟨
● Spatial reference systems
– Most are still flat (projections)
– Geographic SRSs will affect the result of most computations
15Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
5.7
● The world is flat
● The world is infinite
● Axes are unitless
● Axes are orthogonal
● Axis order is irrelevant
● Axis direction is irrelevant
8.0
● The world can be flat or ellipsoidal
● Geographic coordinate systems
wrap around
● Axes have units
● Geographic axes are not
orthogonal
● Geographic axis order matters
● Axis direction may be relevant
Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
What can I do now to prepare for what's coming?
17Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Cartesian vs. geographic
● Operations on geometries in geographic SRSs will be computed in
geographic SRSs
● How do I know which SRS my geometries are in?
– SELECT ST_SRID(geometry);
– MySQL uses EPSG codes as SRIDs
● http://www.epsg-registry.org/
● Changing SRID in 5.7 is a bit complicated:
ST_GeomFromWKB(ST_AsBinary(geometry), srid)
– In 8.0: ST_SRID(geometry, srid)
18Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
✓✓
Prepare now: Use the right SRID
● If you know your data is in a projected SRS, use the correct SRID
– No surprises when upgrading to 8.0
– Semantically correct, carries metadata about units, etc.
● If your data is in a geographic SRS and you know what you're doing, use the
correct SRS or SRID 0
– SRID 0 will give you no surprises when upgrading to 8.0
– Geographic SRSs will affect query results
● If you're unsure which SRS/SRID to use, use SRID 0
– No surprises when upgrading to 8.0
– Makes no claim about the SRS except that it's flat
●
19Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
POINT(50.8267054 4.3980435)
20Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Longitude and latitude … or latitude and longitude
● The “normal” order is latitude first, longitude second
… except in GIS
● Many GIS applications assume longitude-latitude
● ISO and the Open Geospatial Consortium have agreed
– Always use the order specified for the SRS
– Software packages are still trying to adapt
● All geographic SRSs in the EPSG Dataset define latitude-longitude
ordering
● MySQL uses the EPSG Dataset
21Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Axis order in MySQL
● Stored as X=longitude, Y=latitude on disk
– Expected by ST_Distance_Sphere and GeoJSON functions in 5.7
8.0
● Import/export functions will let you choose geographic axis order
– Default: SRS defined (predefined SRSs: latitude-longitude)
– ST_GeomFromText('POINT(1 2)', 4326, 'axis-order=long-lat')
● Function to swap coordinates: ST_SwapXY(geometry)
22Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
✓
Prepare now: Axis order
● If you store angular coordinates, use X=longitude and
Y=latitude
– Not necessary to swap coordinates in 8.0
– Think carefully about the choice of SRID
– Beware of changes in computations in 8.0
● Import/export in SRID 0 is always X first, Y second
23Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Axis direction
● Defined in the SRS
● Doesn't matter on an abstract Cartesian plane (SRID 0)
● Matters on georeferenced planes (projections)
– But doesn't affect computations
● Matters in geographic SRSs
– But doesn't affect computations
– May affect results if the meridian is not through Greenwich
● Coercion to -180, 180]⟨
24Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
Prepare now: Axis direction
● It probably won't affect you
● But do it right still!
✓
25Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
“GIS is a form of digital mapping
technology. Kind of like Google Earth,
but better.”
— Arnold Schwarzenegger, Governor of California
26Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
✓✓
Prepare now
● Think through your use of SRIDs
– Use SRID 0 if you're unsure
● Use longitude-latitude ordering in 5.7
– But remember that import and export functions follow SRS defined
axis order in 8.0
● Think through axis directions
● Follow the progress of MySQL 8.0 GIS development at
http://www.mysqlserverteam.com/
27Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
MySQL 8.0: GIS — Are you ready?
Ad

More Related Content

What's hot (20)

Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
ScyllaDB
 
Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...
Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...
Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...
Uwe Printz
 
Service Function Chaining with SRv6
Service Function Chaining with SRv6Service Function Chaining with SRv6
Service Function Chaining with SRv6
Ahmed AbdelSalam
 
Ceph
CephCeph
Ceph
Hien Nguyen Van
 
Performance Optimizations in Apache Impala
Performance Optimizations in Apache ImpalaPerformance Optimizations in Apache Impala
Performance Optimizations in Apache Impala
Cloudera, Inc.
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
Flink Forward
 
Druid deep dive
Druid deep diveDruid deep dive
Druid deep dive
Kashif Khan
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & Internals
Anton Kirillov
 
MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...
MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...
MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...
MongoDB
 
Introduction to Spark with Python
Introduction to Spark with PythonIntroduction to Spark with Python
Introduction to Spark with Python
Gokhan Atil
 
HDInsight for Architects
HDInsight for ArchitectsHDInsight for Architects
HDInsight for Architects
Ashish Thapliyal
 
Hadoop and Spark
Hadoop and SparkHadoop and Spark
Hadoop and Spark
Shravan (Sean) Pabba
 
From Data Warehouse to Lakehouse
From Data Warehouse to LakehouseFrom Data Warehouse to Lakehouse
From Data Warehouse to Lakehouse
Modern Data Stack France
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
Sumit Maheshwari
 
Stream Processing – Concepts and Frameworks
Stream Processing – Concepts and FrameworksStream Processing – Concepts and Frameworks
Stream Processing – Concepts and Frameworks
Guido Schmutz
 
Write Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdfWrite Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdf
Eric Xiao
 
Sqoop
SqoopSqoop
Sqoop
Prashant Gupta
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
Altinity Ltd
 
Presto best practices for Cluster admins, data engineers and analysts
Presto best practices for Cluster admins, data engineers and analystsPresto best practices for Cluster admins, data engineers and analysts
Presto best practices for Cluster admins, data engineers and analysts
Shubham Tagra
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
ScyllaDB
 
Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...
Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...
Introduction to the Hadoop Ecosystem with Hadoop 2.0 aka YARN (Java Serbia Ed...
Uwe Printz
 
Service Function Chaining with SRv6
Service Function Chaining with SRv6Service Function Chaining with SRv6
Service Function Chaining with SRv6
Ahmed AbdelSalam
 
Performance Optimizations in Apache Impala
Performance Optimizations in Apache ImpalaPerformance Optimizations in Apache Impala
Performance Optimizations in Apache Impala
Cloudera, Inc.
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
Flink Forward
 
State of the Dolphin - May 2022
State of the Dolphin - May 2022State of the Dolphin - May 2022
State of the Dolphin - May 2022
Frederic Descamps
 
Apache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & InternalsApache Spark in Depth: Core Concepts, Architecture & Internals
Apache Spark in Depth: Core Concepts, Architecture & Internals
Anton Kirillov
 
MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...
MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...
MongoDB World 2018: A Journey to the Cloud with Fraud Detection, Transactions...
MongoDB
 
Introduction to Spark with Python
Introduction to Spark with PythonIntroduction to Spark with Python
Introduction to Spark with Python
Gokhan Atil
 
Stream Processing – Concepts and Frameworks
Stream Processing – Concepts and FrameworksStream Processing – Concepts and Frameworks
Stream Processing – Concepts and Frameworks
Guido Schmutz
 
Write Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdfWrite Faster SQL with Trino.pdf
Write Faster SQL with Trino.pdf
Eric Xiao
 
All about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdfAll about Zookeeper and ClickHouse Keeper.pdf
All about Zookeeper and ClickHouse Keeper.pdf
Altinity Ltd
 
Presto best practices for Cluster admins, data engineers and analysts
Presto best practices for Cluster admins, data engineers and analystsPresto best practices for Cluster admins, data engineers and analysts
Presto best practices for Cluster admins, data engineers and analysts
Shubham Tagra
 

Similar to MySQL 8.0: GIS — Are you ready? (20)

Spatial Support in MySQL
Spatial Support in MySQLSpatial Support in MySQL
Spatial Support in MySQL
Norvald Ryeng
 
MySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
MySQL 8.0 Graphical Information System - Mid Atlantic Developers ConferenceMySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
MySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
Dave Stokes
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
Matt Lord
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
Pavan Naik
 
Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...
Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...
Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...
TigerGraph
 
Database@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use themDatabase@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use them
Tammy Bednar
 
Oracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleOracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration Hustle
EDB
 
Gps training
Gps trainingGps training
Gps training
Catherine Pfeifer
 
Gp straining
Gp strainingGp straining
Gp straining
Catherine Pfeifer
 
Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...
Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...
Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...
TigerGraph
 
Discover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQLDiscover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
Oracle Spatial Databases
Oracle Spatial DatabasesOracle Spatial Databases
Oracle Spatial Databases
Andrew Bashfield
 
Using Graph Algorithms for Advanced Analytics - Part 2 Centrality
Using Graph Algorithms for Advanced Analytics - Part 2 CentralityUsing Graph Algorithms for Advanced Analytics - Part 2 Centrality
Using Graph Algorithms for Advanced Analytics - Part 2 Centrality
TigerGraph
 
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
TigerGraph
 
Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...
Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...
Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...
Aerospike
 
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
Karin Patenge
 
Gremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise GraphGremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise Graph
Stephen Mallette
 
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Eelco Visser
 
Getting_Started_with_ArcGIS.pdf
Getting_Started_with_ArcGIS.pdfGetting_Started_with_ArcGIS.pdf
Getting_Started_with_ArcGIS.pdf
Ahmed Arafat
 
Virtual training optimizing the tick stack
Virtual training  optimizing the tick stackVirtual training  optimizing the tick stack
Virtual training optimizing the tick stack
InfluxData
 
Spatial Support in MySQL
Spatial Support in MySQLSpatial Support in MySQL
Spatial Support in MySQL
Norvald Ryeng
 
MySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
MySQL 8.0 Graphical Information System - Mid Atlantic Developers ConferenceMySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
MySQL 8.0 Graphical Information System - Mid Atlantic Developers Conference
Dave Stokes
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
Matt Lord
 
Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...
Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...
Graph Gurus Episode 8: Location, Location, Location - Geospatial Analysis wit...
TigerGraph
 
Database@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use themDatabase@Home - Maps and Spatial Analyses: How to use them
Database@Home - Maps and Spatial Analyses: How to use them
Tammy Bednar
 
Oracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleOracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration Hustle
EDB
 
Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...
Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...
Using Graph Algorithms For Advanced Analytics - Part 4 Similarity 30 graph al...
TigerGraph
 
Discover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQLDiscover PostGIS: Add Spatial functions to PostgreSQL
Discover PostGIS: Add Spatial functions to PostgreSQL
EDB
 
Using Graph Algorithms for Advanced Analytics - Part 2 Centrality
Using Graph Algorithms for Advanced Analytics - Part 2 CentralityUsing Graph Algorithms for Advanced Analytics - Part 2 Centrality
Using Graph Algorithms for Advanced Analytics - Part 2 Centrality
TigerGraph
 
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
TigerGraph
 
Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...
Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...
Theresa Melvin, HP Enterprise - IOT/AI/ML at Hyperscale - how to go faster wi...
Aerospike
 
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
Karin Patenge
 
Gremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise GraphGremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise Graph
Stephen Mallette
 
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Domain Specific Languages for Parallel Graph AnalytiX (PGX)
Eelco Visser
 
Getting_Started_with_ArcGIS.pdf
Getting_Started_with_ArcGIS.pdfGetting_Started_with_ArcGIS.pdf
Getting_Started_with_ArcGIS.pdf
Ahmed Arafat
 
Virtual training optimizing the tick stack
Virtual training  optimizing the tick stackVirtual training  optimizing the tick stack
Virtual training optimizing the tick stack
InfluxData
 
Ad

More from Norvald Ryeng (7)

MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
JSON Array Indexes in MySQL
JSON Array Indexes in MySQLJSON Array Indexes in MySQL
JSON Array Indexes in MySQL
Norvald Ryeng
 
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZEMySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
Norvald Ryeng
 
LATERAL Derived Tables in MySQL 8.0
LATERAL Derived Tables in MySQL 8.0LATERAL Derived Tables in MySQL 8.0
LATERAL Derived Tables in MySQL 8.0
Norvald Ryeng
 
More SQL in MySQL 8.0
More SQL in MySQL 8.0More SQL in MySQL 8.0
More SQL in MySQL 8.0
Norvald Ryeng
 
MySQL 8.0: What Is New in Optimizer and Executor?
MySQL 8.0: What Is New in Optimizer and Executor?MySQL 8.0: What Is New in Optimizer and Executor?
MySQL 8.0: What Is New in Optimizer and Executor?
Norvald Ryeng
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
Norvald Ryeng
 
MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
Norvald Ryeng
 
JSON Array Indexes in MySQL
JSON Array Indexes in MySQLJSON Array Indexes in MySQL
JSON Array Indexes in MySQL
Norvald Ryeng
 
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZEMySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
MySQL 8.0.18 latest updates: Hash join and EXPLAIN ANALYZE
Norvald Ryeng
 
LATERAL Derived Tables in MySQL 8.0
LATERAL Derived Tables in MySQL 8.0LATERAL Derived Tables in MySQL 8.0
LATERAL Derived Tables in MySQL 8.0
Norvald Ryeng
 
More SQL in MySQL 8.0
More SQL in MySQL 8.0More SQL in MySQL 8.0
More SQL in MySQL 8.0
Norvald Ryeng
 
MySQL 8.0: What Is New in Optimizer and Executor?
MySQL 8.0: What Is New in Optimizer and Executor?MySQL 8.0: What Is New in Optimizer and Executor?
MySQL 8.0: What Is New in Optimizer and Executor?
Norvald Ryeng
 
How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0How to Take Advantage of Optimizer Improvements in MySQL 8.0
How to Take Advantage of Optimizer Improvements in MySQL 8.0
Norvald Ryeng
 
Ad

Recently uploaded (20)

Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 

MySQL 8.0: GIS — Are you ready?

  • 1. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. MySQL 8.0: GIS — Are you ready? Norvald H. Ryeng Software Engineer Pre-FOSDEM MySQL Day 2017
  • 2. 4Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Safe Harbor Statement 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.
  • 3. 5Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Agenda GIS basics What's new in MySQL 8.0? What can I do now to prepare for what's coming? 1 2 3 4 5 6 7
  • 4. 6Copyright © 2017 Oracle and/or its affiliates. All rights reserved. “The early days of GIS were very lonely. No-one knew what it meant.” — Roger Tomlinson, “Father of GIS”
  • 5. 7Copyright © 2017 Oracle and/or its affiliates. All rights reserved. GIS basics: Geometries (= geometric objects) ● Geometry – Point – LineString – Polygon – GeometryCollection ● MultiPoint ● MultiLineString ● MultiPolygon
  • 6. 11Copyright © 2017 Oracle and/or its affiliates. All rights reserved. GIS basics: Spatial reference systems SRID 0 Projected SRS Geographic SRS Cartesian SRS 5.7 8.0
  • 7. 12Copyright © 2017 Oracle and/or its affiliates. All rights reserved. GIS basics: Spatial reference systems ● Each SRS has a unique spatial reference system ID (SRID) – Numeric identifier – No formal standard/catalog of SRIDs – De facto standard: EPSG Dataset ● 4326 = WGS 84 (“GPS coordinates”) ● 3857 = WGS 84 / World Mercator (“Web Mercator”) ● A property of each geometry ● Mixing geometries in different SRIDs in one computation doesn't make sense and will raise an error (also in 5.7)
  • 8. 13Copyright © 2017 Oracle and/or its affiliates. All rights reserved. “Geography is just physics slowed down, with a couple of trees stuck in it.” — Terry Pratchett in The Last Continent
  • 9. 14Copyright © 2017 Oracle and/or its affiliates. All rights reserved. What's new in MySQL 8.0 ● Geography – Earth is round(ish) – Lines are not straight – The coordinate system wraps: -180, 180]⟨ ● Spatial reference systems – Most are still flat (projections) – Geographic SRSs will affect the result of most computations
  • 10. 15Copyright © 2017 Oracle and/or its affiliates. All rights reserved. 5.7 ● The world is flat ● The world is infinite ● Axes are unitless ● Axes are orthogonal ● Axis order is irrelevant ● Axis direction is irrelevant 8.0 ● The world can be flat or ellipsoidal ● Geographic coordinate systems wrap around ● Axes have units ● Geographic axes are not orthogonal ● Geographic axis order matters ● Axis direction may be relevant
  • 11. Copyright © 2017 Oracle and/or its affiliates. All rights reserved. What can I do now to prepare for what's coming?
  • 12. 17Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Cartesian vs. geographic ● Operations on geometries in geographic SRSs will be computed in geographic SRSs ● How do I know which SRS my geometries are in? – SELECT ST_SRID(geometry); – MySQL uses EPSG codes as SRIDs ● http://www.epsg-registry.org/ ● Changing SRID in 5.7 is a bit complicated: ST_GeomFromWKB(ST_AsBinary(geometry), srid) – In 8.0: ST_SRID(geometry, srid)
  • 13. 18Copyright © 2017 Oracle and/or its affiliates. All rights reserved. ✓✓ Prepare now: Use the right SRID ● If you know your data is in a projected SRS, use the correct SRID – No surprises when upgrading to 8.0 – Semantically correct, carries metadata about units, etc. ● If your data is in a geographic SRS and you know what you're doing, use the correct SRS or SRID 0 – SRID 0 will give you no surprises when upgrading to 8.0 – Geographic SRSs will affect query results ● If you're unsure which SRS/SRID to use, use SRID 0 – No surprises when upgrading to 8.0 – Makes no claim about the SRS except that it's flat ●
  • 14. 19Copyright © 2017 Oracle and/or its affiliates. All rights reserved. POINT(50.8267054 4.3980435)
  • 15. 20Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Longitude and latitude … or latitude and longitude ● The “normal” order is latitude first, longitude second … except in GIS ● Many GIS applications assume longitude-latitude ● ISO and the Open Geospatial Consortium have agreed – Always use the order specified for the SRS – Software packages are still trying to adapt ● All geographic SRSs in the EPSG Dataset define latitude-longitude ordering ● MySQL uses the EPSG Dataset
  • 16. 21Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Axis order in MySQL ● Stored as X=longitude, Y=latitude on disk – Expected by ST_Distance_Sphere and GeoJSON functions in 5.7 8.0 ● Import/export functions will let you choose geographic axis order – Default: SRS defined (predefined SRSs: latitude-longitude) – ST_GeomFromText('POINT(1 2)', 4326, 'axis-order=long-lat') ● Function to swap coordinates: ST_SwapXY(geometry)
  • 17. 22Copyright © 2017 Oracle and/or its affiliates. All rights reserved. ✓ Prepare now: Axis order ● If you store angular coordinates, use X=longitude and Y=latitude – Not necessary to swap coordinates in 8.0 – Think carefully about the choice of SRID – Beware of changes in computations in 8.0 ● Import/export in SRID 0 is always X first, Y second
  • 18. 23Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Axis direction ● Defined in the SRS ● Doesn't matter on an abstract Cartesian plane (SRID 0) ● Matters on georeferenced planes (projections) – But doesn't affect computations ● Matters in geographic SRSs – But doesn't affect computations – May affect results if the meridian is not through Greenwich ● Coercion to -180, 180]⟨
  • 19. 24Copyright © 2017 Oracle and/or its affiliates. All rights reserved. Prepare now: Axis direction ● It probably won't affect you ● But do it right still! ✓
  • 20. 25Copyright © 2017 Oracle and/or its affiliates. All rights reserved. “GIS is a form of digital mapping technology. Kind of like Google Earth, but better.” — Arnold Schwarzenegger, Governor of California
  • 21. 26Copyright © 2017 Oracle and/or its affiliates. All rights reserved. ✓✓ Prepare now ● Think through your use of SRIDs – Use SRID 0 if you're unsure ● Use longitude-latitude ordering in 5.7 – But remember that import and export functions follow SRS defined axis order in 8.0 ● Think through axis directions ● Follow the progress of MySQL 8.0 GIS development at http://www.mysqlserverteam.com/
  • 22. 27Copyright © 2017 Oracle and/or its affiliates. All rights reserved.