SlideShare a Scribd company logo
1 of 23
Download to read offline
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?

More Related Content

What's hot

PHP の GC の話
PHP の GC の話PHP の GC の話
PHP の GC の話y-uti
 
Raspberry PiとGoogle Meetでお手軽ペットカメラ
Raspberry PiとGoogle Meetでお手軽ペットカメラRaspberry PiとGoogle Meetでお手軽ペットカメラ
Raspberry PiとGoogle Meetでお手軽ペットカメラKLab Inc. / Tech
 
Raspberry Pi + Go で IoT した話
Raspberry Pi + Go で IoT した話Raspberry Pi + Go で IoT した話
Raspberry Pi + Go で IoT した話yaegashi
 
使ってみて気づいた AGPL ライセンスの メリット・デメリット
使ってみて気づいた AGPL ライセンスの メリット・デメリット使ってみて気づいた AGPL ライセンスの メリット・デメリット
使ってみて気づいた AGPL ライセンスの メリット・デメリットFumito Mizuno
 
180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう
180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう
180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみようMichio Kataoka
 
Cisco ACI 情報源
Cisco ACI 情報源Cisco ACI 情報源
Cisco ACI 情報源Takao Setaka
 
PHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニックPHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニックYoshio Hanawa
 
機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開
機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開
機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開Ichigaku Takigawa
 
Async await完全に理解した
Async await完全に理解したAsync await完全に理解した
Async await完全に理解したasuka y
 
オープンソースライセンスの基礎と実務
オープンソースライセンスの基礎と実務オープンソースライセンスの基礎と実務
オープンソースライセンスの基礎と実務Yutaka Kachi
 
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)NTT DATA Technology & Innovation
 
REST API のコツ
REST API のコツREST API のコツ
REST API のコツpospome
 
mypy - 待望のPython3.9型ヒント対応
mypy - 待望のPython3.9型ヒント対応mypy - 待望のPython3.9型ヒント対応
mypy - 待望のPython3.9型ヒント対応KyutatsuNishiura
 
技術的負債との戦い方
技術的負債との戦い方技術的負債との戦い方
技術的負債との戦い方Iosif Takakura
 
ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門Hirotaka Kawata
 
Session 4 - Bringing the pieces together - Detailed review of a reference ex...
Session 4 -  Bringing the pieces together - Detailed review of a reference ex...Session 4 -  Bringing the pieces together - Detailed review of a reference ex...
Session 4 - Bringing the pieces together - Detailed review of a reference ex...FIWARE
 
Kubernetes雑にまとめてみた 2020年8月版
Kubernetes雑にまとめてみた 2020年8月版Kubernetes雑にまとめてみた 2020年8月版
Kubernetes雑にまとめてみた 2020年8月版VirtualTech Japan Inc.
 
OWLで何が書けるか
OWLで何が書けるかOWLで何が書けるか
OWLで何が書けるかKazuro Fukuhara
 
2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて
2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて
2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについてNatsuki Yamanaka
 
jqで極めるシェル芸の話
jqで極めるシェル芸の話jqで極めるシェル芸の話
jqで極めるシェル芸の話Yoichi Toyota
 

What's hot (20)

PHP の GC の話
PHP の GC の話PHP の GC の話
PHP の GC の話
 
Raspberry PiとGoogle Meetでお手軽ペットカメラ
Raspberry PiとGoogle Meetでお手軽ペットカメラRaspberry PiとGoogle Meetでお手軽ペットカメラ
Raspberry PiとGoogle Meetでお手軽ペットカメラ
 
Raspberry Pi + Go で IoT した話
Raspberry Pi + Go で IoT した話Raspberry Pi + Go で IoT した話
Raspberry Pi + Go で IoT した話
 
使ってみて気づいた AGPL ライセンスの メリット・デメリット
使ってみて気づいた AGPL ライセンスの メリット・デメリット使ってみて気づいた AGPL ライセンスの メリット・デメリット
使ってみて気づいた AGPL ライセンスの メリット・デメリット
 
180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう
180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう
180421第8回関西DB勉強会- たまにはpgAdmin4も使ってみよう
 
Cisco ACI 情報源
Cisco ACI 情報源Cisco ACI 情報源
Cisco ACI 情報源
 
PHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニックPHP7の内部実装から学ぶ性能改善テクニック
PHP7の内部実装から学ぶ性能改善テクニック
 
機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開
機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開
機械学習と機械発見:自然科学融合が誘起するデータ科学の新展開
 
Async await完全に理解した
Async await完全に理解したAsync await完全に理解した
Async await完全に理解した
 
オープンソースライセンスの基礎と実務
オープンソースライセンスの基礎と実務オープンソースライセンスの基礎と実務
オープンソースライセンスの基礎と実務
 
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
PostgreSQLレプリケーション10周年!徹底紹介!(PostgreSQL Conference Japan 2019講演資料)
 
REST API のコツ
REST API のコツREST API のコツ
REST API のコツ
 
mypy - 待望のPython3.9型ヒント対応
mypy - 待望のPython3.9型ヒント対応mypy - 待望のPython3.9型ヒント対応
mypy - 待望のPython3.9型ヒント対応
 
技術的負債との戦い方
技術的負債との戦い方技術的負債との戦い方
技術的負債との戦い方
 
ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門
 
Session 4 - Bringing the pieces together - Detailed review of a reference ex...
Session 4 -  Bringing the pieces together - Detailed review of a reference ex...Session 4 -  Bringing the pieces together - Detailed review of a reference ex...
Session 4 - Bringing the pieces together - Detailed review of a reference ex...
 
Kubernetes雑にまとめてみた 2020年8月版
Kubernetes雑にまとめてみた 2020年8月版Kubernetes雑にまとめてみた 2020年8月版
Kubernetes雑にまとめてみた 2020年8月版
 
OWLで何が書けるか
OWLで何が書けるかOWLで何が書けるか
OWLで何が書けるか
 
2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて
2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて
2015 03 26 社内勉強会_オープンソースソフトウェアライセンスについて
 
jqで極めるシェル芸の話
jqで極めるシェル芸の話jqで極めるシェル芸の話
jqで極めるシェル芸の話
 

Similar to MySQL 8.0: GIS — Are you ready?

Spatial Support in MySQL
Spatial Support in MySQLSpatial Support in MySQL
Spatial Support in MySQLNorvald Ryeng
 
MySQL 8.0 GIS Overview
MySQL 8.0 GIS OverviewMySQL 8.0 GIS Overview
MySQL 8.0 GIS OverviewNorvald 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 ConferenceDave Stokes
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GISMatt 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 themTammy Bednar
 
Oracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleOracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleEDB
 
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 PostgreSQLEDB
 
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 CentralityTigerGraph
 
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 2TigerGraph
 
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_KPatengeKarin Patenge
 
Gremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise GraphGremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise GraphStephen 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.pdfAhmed Arafat
 

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
 
MySQL 8.0 GIS Overview
MySQL 8.0 GIS OverviewMySQL 8.0 GIS Overview
MySQL 8.0 GIS Overview
 
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
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
 
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...
 
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
 
Oracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration HustleOracle to Postgres Schema Migration Hustle
Oracle to Postgres Schema Migration Hustle
 
Gps training
Gps trainingGps training
Gps training
 
Gp straining
Gp strainingGp straining
Gp straining
 
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...
 
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
 
Oracle Spatial Databases
Oracle Spatial DatabasesOracle Spatial Databases
Oracle Spatial Databases
 
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
 
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
 
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...
 
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
20190703_AGIT_GeoRasterWorkshop_GriddedData_KPatenge
 
Gremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise GraphGremlin Queries with DataStax Enterprise Graph
Gremlin Queries with DataStax Enterprise Graph
 
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)
 
Getting_Started_with_ArcGIS.pdf
Getting_Started_with_ArcGIS.pdfGetting_Started_with_ArcGIS.pdf
Getting_Started_with_ArcGIS.pdf
 

More from Norvald Ryeng

MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZENorvald Ryeng
 
JSON Array Indexes in MySQL
JSON Array Indexes in MySQLJSON Array Indexes in MySQL
JSON Array Indexes in MySQLNorvald 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 ANALYZENorvald 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.0Norvald Ryeng
 
More SQL in MySQL 8.0
More SQL in MySQL 8.0More SQL in MySQL 8.0
More SQL in MySQL 8.0Norvald 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.0Norvald Ryeng
 

More from Norvald Ryeng (7)

MySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZEMySQL 8.0 EXPLAIN ANALYZE
MySQL 8.0 EXPLAIN ANALYZE
 
JSON Array Indexes in MySQL
JSON Array Indexes in MySQLJSON Array Indexes in MySQL
JSON Array Indexes in MySQL
 
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
 
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
 
More SQL in MySQL 8.0
More SQL in MySQL 8.0More SQL in MySQL 8.0
More SQL in MySQL 8.0
 
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?
 
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
 

Recently uploaded

Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 

Recently uploaded (20)

Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 

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.