affiliates 商品情報とサイズを管理する product_id INT PRIMARY KEY name VARCHAR(255) options JSON created_at TIMESTAMP product_id INT size VARCHAR(10) INDEX 商品サイズ<product_sizes> S INDEX M INDEX L INDEX XL INDEX Generated Column 正規化
✓ 基準点(東京タワー)を設定 SET @user_loc = ST_GeomFromText('POINT(35.6586 139.7454)', 4326); ✓ サンプルSQL: 5km以内の店舗を抽出 SELECT name, ST_Distance_Sphere(location, @user_loc) AS dist_m FROM shops WHERE ST_Distance_Sphere(location, @user_loc) < 5000 ORDER BY dist_m; 5km ✓ 結果例 +---------------+--------------------------+ | name | dist_m | +---------------+--------------------------+ | Tokyo Station | 3187.1248482174333 | +---------------+--------------------------+ 東京駅
✓ サンプルSQL: 店舗の距離を確認 SELECT name, ST_Distance_Sphere(location, ST_GeomFromText('POINT(35.6586 139.7454)', 4326)) AS dist_m FROM shops ORDER BY dist_m; 5km ✓ 結果例
All rights reserved. 31 [opc@test01 ~]$ mysqlsh [email protected] MySQL Shell 8.1.1 Copyright (c) 2016, 2023, Oracle and/or its affiliates. ...... Server version: 8.2.0-u1-cloud MySQL Enterprise - Cloud No default schema selected; type \use <schema> to set one. MySQL 10.0.X.X:33060+ ssl JS > const db = session.getSchema('tpch_10g'); MySQL 10.0.X.X:33060+ ssl JS > db.createCollection('CUSTOMER_DOC'); <Collection:myShCollection> MySQL 10.0.X.X:33060+ ssl JS > db.CUSTOMER_DOC.add({"title":"Hello World", "text":"This is the fir st post via mysqlx"}); Query OK, 1 item affected (0.0042 sec) MySQL 10.0.X.X:33060+ ssl JS > db.CUSTOMER_DOC.find('$.title = "Hello World"').sort(["title"]); { "_id": "0000657684930000000000000013", "text": "This is the first post via mysqlx", "title": "Hello World" } 1 document in set (0.0007 sec)
and/or its affiliates. VS Codeプラグインとして提供 データベースノートブックインタフェース • 書込み, 実行, 変更 MySQL Shell GUI コンソール • MySQL Shellの活用 MySQL環境の統合 • MySQLオンプレミスとHeatWaveインスタンス管理 ドキュメント:MySQL Shell GUI / MySQL Shell for VS Code https://dev.mysql.com/doc/mysql-shell-gui/en/
affiliates. 最新版の利用を推奨 • 公開時点でSustainingステータスになっていた5.7はオフィシャルにはサポート外 • 商用版ではEnterprise Edition以上がOracle Premier Supportの対象 https://www.mysql.com/jp/support/supportedplatforms/compatibility.html https://www.mysql.com/jp/products/ MySQL Server 5.7 8.0 8.4 LTS 9.0 IR MySQL Shell 8.0 8.4 LTS 9.0 IR MySQL Shell for VS Code 9.0