{"id":512,"date":"2022-11-20T05:52:16","date_gmt":"2022-10-21T01:25:59","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2025-08-01T00:10:06","modified_gmt":"2025-07-31T15:10:06","slug":"mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5"},"content":{"rendered":"<p>\u8457\u8005\u306f\u300cWrite for Donations\u300d\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001\u5bc4\u4ed8\u91d1\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306bDiversity in Tech Fund\u3092\u9078\u3073\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/h3>\n<p>\u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u6570\u767e\u4e07\u884c\u3092\u6709\u3059\u308b\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u542b\u3080\u3001\u3042\u3089\u3086\u308b\u30b5\u30a4\u30ba\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u69cb\u9020\u5316\u30af\u30a8\u30ea\u8a00\u8a9e\uff08SQL\uff09\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u7279\u5b9a\u306e\u884c\u3092\u7c21\u6f54\u3067\u76f4\u611f\u7684\u306a\u65b9\u6cd5\u3067\u691c\u7d22\u3059\u308b\u624b\u6bb5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u3001\u305d\u308c\u3089\u5185\u306e\u7279\u5b9a\u306e\u884c\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u306f\u307e\u3059\u307e\u3059\u56f0\u96e3\u306b\u306a\u308a\u3001\u307e\u308b\u3067\u5e72\u3057\u8349\u306e\u4e2d\u304b\u3089\u91dd\u3092\u63a2\u3059\u3088\u3046\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u69d8\u3005\u306a\u30af\u30a8\u30ea\u6761\u4ef6\u3092\u53d7\u3051\u5165\u308c\u308b\u80fd\u529b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306b\u3068\u3063\u3066\u3001\u3069\u306e\u30af\u30a8\u30ea\u304c\u6700\u3082\u4e00\u822c\u7684\u3067\u3042\u308b\u304b\u3092\u4e88\u6e2c\u3059\u308b\u3053\u3068\u3092\u96e3\u3057\u304f\u3057\u307e\u3059\u3002\u30a8\u30f3\u30b8\u30f3\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u3067\u52b9\u7387\u7684\u306b\u884c\u3092\u898b\u3064\u3051\u308b\u6e96\u5099\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u304c\u3001\u30c7\u30fc\u30bf\u91cf\u304c\u5897\u3048\u308b\u3068\u691c\u7d22\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u5f71\u97ff\u304c\u51fa\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304c\u5927\u304d\u3051\u308c\u3070\u5927\u304d\u3044\u307b\u3069\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306f\u30af\u30a8\u30ea\u306b\u4e00\u81f4\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u7d20\u65e9\u304f\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u96e3\u3057\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u8005\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3001\u305d\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6539\u5584\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u306f\u4f55\u304b\u3001\u3069\u306e\u3088\u3046\u306b\u4f5c\u6210\u3059\u308b\u304b\u3001\u305d\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30af\u30a8\u30ea\u306b\u4f7f\u7528\u3055\u308c\u308b\u304b\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306b\u5f93\u3046\u305f\u3081\u306b\u306f\u3001SQL\u30d9\u30fc\u30b9\u306e\u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\uff08RDBMS\uff09\u304c\u52d5\u4f5c\u3059\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u306e\u624b\u9806\u3068\u4f8b\u306f\u3001\u4ee5\u4e0b\u306e\u74b0\u5883\u3067\u691c\u8a3c\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<ul class=\"post-ul\">\n<li>A server running Ubuntu 20.04, with a non-root user with administrative privileges and a firewall configured with UFW, as described in our initial server setup guide for Ubuntu 20.04.<\/li>\n<li>MySQL installed and secured on the server, as outlined in How To Install MySQL on Ubuntu 20.04. This guide was verified with a non-root MySQL user, created using the process described in Step 3.<\/li>\n<li>Basic familiarity with executing SELECT queries to retrieve data from the database as described in our How To SELECT Rows FROM Tables in SQL guide.<\/li>\n<\/ul>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u591a\u304f\u306eRDBMS\u306f\u72ec\u81ea\u306eSQL\u306e\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u8aac\u660e\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306f\u3001\u307b\u3068\u3093\u3069\u306eRDBMS\u3067\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u6a19\u6e96\u306eSQL\u69cb\u6587\u306e\u4e00\u90e8\u3067\u306f\u306a\u3044\u305f\u3081\u3001MySQL\u4ee5\u5916\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u30c6\u30b9\u30c8\u3059\u308b\u5834\u5408\u306f\u3001\u6b63\u78ba\u306a\u69cb\u6587\u3084\u51fa\u529b\u304c\u7570\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u304c\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u542b\u3093\u3060\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3082\u5fc5\u8981\u3067\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u7df4\u7fd2\u3059\u308b\u305f\u3081\u306b\u306f\u3001MySQL\u306b\u63a5\u7d9a\u3057\u3001\u3053\u306e\u30ac\u30a4\u30c9\u5168\u4f53\u3067\u4f7f\u7528\u3055\u308c\u308b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u8a73\u7d30\u306b\u3064\u3044\u3066\u3001\u4ee5\u4e0b\u306e\u300cMySQL\u3078\u306e\u63a5\u7d9a\u300d\u3068\u300c\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u300d\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>MySQL\u306b\u63a5\u7d9a\u3057\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3092\u884c\u3046\u3002<\/h2>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3057\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u3001\u3053\u306e\u30ac\u30a4\u30c9\u306e\u4f8b\u306b\u5f93\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u304c\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u306bSSH\u63a5\u7d9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ssh<\/span> <mark>sammy<\/mark>@<mark>your_server_ip<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u304d\u3001\u3042\u306a\u305f\u306eMySQL\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u540d\u524d\u3067&#8221; sammy &#8220;\u3092\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">mysql <span class=\"token parameter variable\">-u<\/span> <mark>sammy<\/mark> <span class=\"token parameter variable\">-p<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE DATABASE indexes<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u6b63\u5e38\u306b\u4f5c\u6210\u3055\u308c\u305f\u5834\u5408\u3001\u6b21\u306e\u3088\u3046\u306a\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 1 row affected (0.01 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306eUSE\u6587\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">USE indexes<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u3092\u53d7\u3051\u53d6\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Database changed<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3057\u305f\u5f8c\u3001\u305d\u306e\u4e2d\u306b\u30b5\u30f3\u30d7\u30eb\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001\u67b6\u7a7a\u306e\u5f93\u696d\u54e1\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u73fe\u5728\u306e\u5f93\u696d\u54e1\u3068\u305d\u306e\u52e4\u52d9\u30c7\u30d0\u30a4\u30b9\u306e\u8a73\u7d30\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306e\u5f93\u696d\u54e1\u306b\u95a2\u3059\u308b\u7c21\u7565\u5316\u3055\u308c\u305f\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002\u6b21\u306e\u30ab\u30e9\u30e0\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>employee_id: This column holds the employee identifier, represented by the int data type. This column will become the table\u2019s primary key, with each value becoming a unique identifier for its respective row.<\/li>\n<li>first_name: This column holds the first name of each employee, expressed using the varchar data type with a maximum of 50 characters.<\/li>\n<li>last_name: This column holds the last name of each employee, expressed using the varchar data type with a maximum of 50 characters.<\/li>\n<li>device_serial: This column holds the serial number of the computer assigned to the employee, expressed using the varchar data type with a maximum of 15 characters.<\/li>\n<li>salary: This column holds each employee\u2019s salary, expressed using the int data type storing numerical data.<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b5\u30f3\u30d7\u30eb\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE TABLE employees <span class=\"token punctuation\">(<\/span><\/li>\n<li data-prefix=\"mysql&gt;\">employee_id int,<\/li>\n<li data-prefix=\"mysql&gt;\">first_name varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">last_name varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">device_serial varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">15<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">salary int<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3082\u3057\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u30c6\u30fc\u30d6\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u6b21\u306eINSERT INTO\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3066\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306b\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">INSERT INTO employees VALUES<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span>, <span class=\"token string\">&#8216;John&#8217;<\/span>, <span class=\"token string\">&#8216;Smith&#8217;<\/span>, <span class=\"token string\">&#8216;ABC123&#8217;<\/span>, <span class=\"token number\">60000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span>, <span class=\"token string\">&#8216;Jane&#8217;<\/span>, <span class=\"token string\">&#8216;Doe&#8217;<\/span>, <span class=\"token string\">&#8216;DEF456&#8217;<\/span>, <span class=\"token number\">65000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">3<\/span>, <span class=\"token string\">&#8216;Bob&#8217;<\/span>, <span class=\"token string\">&#8216;Johnson&#8217;<\/span>, <span class=\"token string\">&#8216;GHI789&#8217;<\/span>, <span class=\"token number\">70000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">4<\/span>, <span class=\"token string\">&#8216;Sally&#8217;<\/span>, <span class=\"token string\">&#8216;Fields&#8217;<\/span>, <span class=\"token string\">&#8216;JKL012&#8217;<\/span>, <span class=\"token number\">75000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span>, <span class=\"token string\">&#8216;Michael&#8217;<\/span>, <span class=\"token string\">&#8216;Smith&#8217;<\/span>, <span class=\"token string\">&#8216;MNO345&#8217;<\/span>, <span class=\"token number\">80000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">6<\/span>, <span class=\"token string\">&#8216;Emily&#8217;<\/span>, <span class=\"token string\">&#8216;Jones&#8217;<\/span>, <span class=\"token string\">&#8216;PQR678&#8217;<\/span>, <span class=\"token number\">85000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">7<\/span>, <span class=\"token string\">&#8216;David&#8217;<\/span>, <span class=\"token string\">&#8216;Williams&#8217;<\/span>, <span class=\"token string\">&#8216;STU901&#8217;<\/span>, <span class=\"token number\">90000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">8<\/span>, <span class=\"token string\">&#8216;Sarah&#8217;<\/span>, <span class=\"token string\">&#8216;Johnson&#8217;<\/span>, <span class=\"token string\">&#8216;VWX234&#8217;<\/span>, <span class=\"token number\">95000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">9<\/span>, <span class=\"token string\">&#8216;James&#8217;<\/span>, <span class=\"token string\">&#8216;Brown&#8217;<\/span>, <span class=\"token string\">&#8216;YZA567&#8217;<\/span>, <span class=\"token number\">100000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">10<\/span>, <span class=\"token string\">&#8216;Emma&#8217;<\/span>, <span class=\"token string\">&#8216;Miller&#8217;<\/span>, <span class=\"token string\">&#8216;BCD890&#8217;<\/span>, <span class=\"token number\">105000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">11<\/span>, <span class=\"token string\">&#8216;William&#8217;<\/span>, <span class=\"token string\">&#8216;Davis&#8217;<\/span>, <span class=\"token string\">&#8216;EFG123&#8217;<\/span>, <span class=\"token number\">110000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">12<\/span>, <span class=\"token string\">&#8216;Olivia&#8217;<\/span>, <span class=\"token string\">&#8216;Garcia&#8217;<\/span>, <span class=\"token string\">&#8216;HIJ456&#8217;<\/span>, <span class=\"token number\">115000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">13<\/span>, <span class=\"token string\">&#8216;Christopher&#8217;<\/span>, <span class=\"token string\">&#8216;Rodriguez&#8217;<\/span>, <span class=\"token string\">&#8216;KLM789&#8217;<\/span>, <span class=\"token number\">120000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">14<\/span>, <span class=\"token string\">&#8216;Isabella&#8217;<\/span>, <span class=\"token string\">&#8216;Wilson&#8217;<\/span>, <span class=\"token string\">&#8216;NOP012&#8217;<\/span>, <span class=\"token number\">125000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">15<\/span>, <span class=\"token string\">&#8216;Matthew&#8217;<\/span>, <span class=\"token string\">&#8216;Martinez&#8217;<\/span>, <span class=\"token string\">&#8216;QRS345&#8217;<\/span>, <span class=\"token number\">130000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">16<\/span>, <span class=\"token string\">&#8216;Sophia&#8217;<\/span>, <span class=\"token string\">&#8216;Anderson&#8217;<\/span>, <span class=\"token string\">&#8216;TUV678&#8217;<\/span>, <span class=\"token number\">135000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">17<\/span>, <span class=\"token string\">&#8216;Daniel&#8217;<\/span>, <span class=\"token string\">&#8216;Smith&#8217;<\/span>, <span class=\"token string\">&#8216;WXY901&#8217;<\/span>, <span class=\"token number\">140000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">18<\/span>, <span class=\"token string\">&#8216;Mia&#8217;<\/span>, <span class=\"token string\">&#8216;Thomas&#8217;<\/span>, <span class=\"token string\">&#8216;ZAB234&#8217;<\/span>, <span class=\"token number\">145000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">19<\/span>, <span class=\"token string\">&#8216;Joseph&#8217;<\/span>, <span class=\"token string\">&#8216;Hernandez&#8217;<\/span>, <span class=\"token string\">&#8216;CDE567&#8217;<\/span>, <span class=\"token number\">150000<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">20<\/span>, <span class=\"token string\">&#8216;Abigail&#8217;<\/span>, <span class=\"token string\">&#8216;Smith&#8217;<\/span>, <span class=\"token string\">&#8216;FGH890&#8217;<\/span>, <span class=\"token number\">155000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u6210\u529f\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u5fdc\u7b54\u3057\u307e\u3059\u3002 (Deetabesu wa seikou mess\u0113ji de \u014dt\u014d shimasu.)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 20 rows affected (0.010 sec) Records: 20 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306f\u6307\u6a19\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3078\u306e\u5f71\u97ff\u3092\u76f4\u63a5\u7684\u306b\u793a\u3059\u307b\u3069\u5927\u304d\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306fMySQL\u304c\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u7d50\u679c\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u30c8\u30e9\u30d0\u30fc\u30b9\u3059\u308b\u884c\u306e\u6570\u3092\u5236\u9650\u3059\u308b\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u3092\u793a\u3057\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u305d\u308c\u3067\u306f\u3001\u3042\u306a\u305f\u306f\u3053\u306e\u30ac\u30a4\u30c9\u306e\u6b8b\u308a\u3092\u8ffd\u3044\u306a\u304c\u3089MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u59cb\u3081\u308b\u6e96\u5099\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3078\u306e\u5c0e\u5165<\/h2>\n<p>\u901a\u5e38\u3001MySQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30c6\u30fc\u30d6\u30eb\u306e\u5168\u3066\u306e\u884c\u3092\u4e00\u3064\u305a\u3064\u78ba\u8a8d\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u3001\u300cSmith\u300d\u3068\u4e00\u81f4\u3059\u308b\u5f93\u696d\u54e1\u306e\u59d3\u3092\u691c\u7d22\u3057\u305f\u308a\u3001\u300c\u6708\u7d66\u304c10\u4e07\u30c9\u30eb\u4ee5\u4e0a\u306e\u5f93\u696d\u54e1\u3092\u3059\u3079\u3066\u691c\u7d22\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30c6\u30fc\u30d6\u30eb\u306e\u5168\u3066\u306e\u884c\u304c\u6761\u4ef6\u306b\u5408\u81f4\u3059\u308b\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u4e00\u3064\u305a\u3064\u8abf\u3079\u3066\u3044\u304d\u307e\u3059\u3002\u6761\u4ef6\u306b\u5408\u81f4\u3059\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u884c\u306f\u8fd4\u3055\u308c\u308b\u884c\u306e\u30ea\u30b9\u30c8\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002\u5408\u81f4\u3057\u306a\u3044\u5834\u5408\u306f\u3001MySQL\u306f\u30c6\u30fc\u30d6\u30eb\u5168\u4f53\u3092\u898b\u308b\u307e\u3067\u6b21\u306e\u884c\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u884c\u3092\u4e00\u81f4\u3055\u305b\u308b\u305f\u3081\u306e\u624b\u6cd5\u306f\u52b9\u679c\u7684\u3067\u3059\u304c\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u306b\u3064\u308c\u3066\u9045\u304f\u306a\u308a\u3001\u30ea\u30bd\u30fc\u30b9\u3092\u6d88\u8cbb\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u7d50\u679c\u3001\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3084\u983b\u7e41\u306a\u30c7\u30fc\u30bf\u30a2\u30af\u30bb\u30b9\u304c\u5fc5\u8981\u306a\u30af\u30a8\u30ea\u306b\u306f\u9069\u3057\u3066\u3044\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u5927\u304d\u306a\u30c6\u30fc\u30d6\u30eb\u3084\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u554f\u984c\u3092\u89e3\u6d88\u3059\u308b\u306b\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u884c\u3068\u306f\u5225\u306b\u3001\u30c7\u30fc\u30bf\u306e\u30bd\u30fc\u30c8\u3055\u308c\u305f\u30b5\u30d6\u30bb\u30c3\u30c8\u306e\u307f\u3092\u683c\u7d0d\u3059\u308b\u30e6\u30cb\u30fc\u30af\u306a\u30c7\u30fc\u30bf\u69cb\u9020\u3067\u3059\u3002\u7279\u5b9a\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u307e\u305f\u306f\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u5024\u3092\u691c\u7d22\u3057\u305f\u308a\u3001\u9806\u5e8f\u3092\u4ed8\u3051\u308b\u969b\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u304c\u3088\u308a\u8fc5\u901f\u304b\u3064\u52b9\u7387\u7684\u306b\u52d5\u4f5c\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u3092\u4f8b\u306b\u6319\u3052\u308b\u3068\u3001\u5178\u578b\u7684\u306a\u30af\u30a8\u30ea\u306e1\u3064\u306f\u5f93\u696d\u54e1\u306e\u59d3\u3067\u691c\u7d22\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u306a\u3044\u5834\u5408\u3001MySQL\u306f\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u3059\u3079\u3066\u306e\u5f93\u696d\u54e1\u3092\u53d6\u308a\u51fa\u3057\u3001\u59d3\u304c\u30af\u30a8\u30ea\u3068\u4e00\u81f4\u3059\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001MySQL\u306f\u59d3\u306e\u5225\u3005\u306e\u30ea\u30b9\u30c8\u3092\u4fdd\u6301\u3057\u3001\u30e1\u30a4\u30f3\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u5bfe\u8c61\u5f93\u696d\u54e1\u3078\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u306e\u307f\u3092\u542b\u307f\u307e\u3059\u3002\u305d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30fc\u30d6\u30eb\u5168\u4f53\u3092\u30b9\u30ad\u30e3\u30f3\u305b\u305a\u306b\u7d50\u679c\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u96fb\u8a71\u5e33\u306e\u985e\u4f3c\u7269\u3068\u8003\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u672c\u306e\u4e2d\u3067\u540d\u524d\u304c\u300cJohn Smith\u300d\u3068\u3044\u3046\u4eba\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306b\u306f\u3001\u307e\u305a\u300cS\u300d\u3067\u59cb\u307e\u308b\u540d\u524d\u306e\u4eba\u3005\u304c\u30ea\u30b9\u30c8\u3055\u308c\u3066\u3044\u308b\u6b63\u3057\u3044\u30da\u30fc\u30b8\u306b\u3081\u304f\u308a\u3001\u305d\u3057\u3066\u300cSm\u300d\u3067\u59cb\u307e\u308b\u540d\u524d\u306e\u4eba\u3005\u304c\u30ea\u30b9\u30c8\u3055\u308c\u3066\u3044\u308b\u30da\u30fc\u30b8\u3092\u63a2\u3057\u307e\u3059\u3002\u3053\u306e\u30ed\u30b8\u30c3\u30af\u306b\u5f93\u3048\u3070\u3001\u6c42\u3081\u3066\u3044\u308b\u4eba\u3068\u306f\u4e00\u81f4\u3057\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u3063\u3066\u3044\u308b\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u8fc5\u901f\u306b\u524a\u9664\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u65b9\u6cd5\u304c\u6a5f\u80fd\u3059\u308b\u306e\u306f\u3001\u96fb\u8a71\u5e33\u306e\u30c7\u30fc\u30bf\u304c\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u306b\u4e26\u3079\u3089\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3042\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u76f4\u63a5\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u306e\u5834\u5408\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u96fb\u8a71\u5e33\u306b\u4f3c\u305f\u5f79\u5272\u3092\u679c\u305f\u3057\u3001\u30c7\u30fc\u30bf\u3078\u306e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u306e\u53c2\u7167\u3092\u4fdd\u6301\u3059\u308b\u3053\u3068\u3067\u3001\u5fc5\u8981\u306a\u884c\u3092\u8fc5\u901f\u306b\u898b\u3064\u3051\u308b\u306e\u3092\u652f\u63f4\u3057\u307e\u3059\u3002<\/p>\n<p>MySQL\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u306b\u306f\u3001\u8907\u6570\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002\u6700\u3082\u4e00\u822c\u7684\u306a\u5229\u70b9\u306f\u3001WHERE\u6761\u4ef6\u3084\u6bd4\u8f03\u306b\u57fa\u3065\u304f\u30af\u30a8\u30ea\u306e\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u3053\u3068\u3001ORDER BY\u53e5\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u3092\u3088\u308a\u901f\u304f\u30bd\u30fc\u30c8\u3059\u308b\u3053\u3068\u3001\u305d\u3057\u3066\u5024\u306e\u4e00\u610f\u6027\u3092\u5f37\u5236\u3059\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u7279\u5b9a\u306e\u72b6\u6cc1\u3067\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f7f\u7528\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d4\u30fc\u30af\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001\u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf\u3068\u4e00\u7dd2\u306b\u4fdd\u5b58\u3055\u308c\u308b\u8ffd\u52a0\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u4f7f\u7528\u3057\u3066\u5b9f\u88c5\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u69cb\u9020\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5909\u66f4\u3054\u3068\u306b\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u305f\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001\u305d\u306e\u305f\u3081\u306bINSERT\u3001UPDATE\u3001DELETE\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u4f4e\u4e0b\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u983b\u7e41\u306b\u5909\u66f4\u3055\u308c\u308b\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u306f\u3001SELECT\u30af\u30a8\u30ea\u306e\u901f\u5ea6\u5411\u4e0a\u306b\u3088\u308b\u5229\u70b9\u3088\u308a\u3082\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u30c7\u30fc\u30bf\u66f8\u304d\u8fbc\u307f\u30af\u30a8\u30ea\u306e\u660e\u3089\u304b\u306b\u9045\u3044\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u65b9\u304c\u91cd\u8996\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u4f4e\u4e0b\u3057\u59cb\u3081\u305f\u5834\u5408\u306a\u3069\u306e\u660e\u78ba\u306a\u5fc5\u8981\u6027\u304c\u3042\u308b\u3068\u304d\u306b\u306e\u307f\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u3002\u4f5c\u6210\u3059\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u9078\u629e\u306b\u969b\u3057\u3066\u306f\u3001\u6700\u3082\u983b\u7e41\u306b\u5b9f\u884c\u3055\u308c\u3001\u6642\u9593\u304c\u6700\u3082\u304b\u304b\u308b\u30af\u30a8\u30ea\u3092\u8003\u616e\u3057\u3001\u305d\u308c\u3089\u306b\u6700\u3082\u6069\u6075\u3092\u3082\u305f\u3089\u3059\u30af\u30a8\u30ea\u6761\u4ef6\u306b\u57fa\u3065\u3044\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u69cb\u7bc9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u3053\u306e\u30ac\u30a4\u30c9\u306f\u3001MySQL\u306b\u304a\u3051\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30c8\u30d4\u30c3\u30af\u3092\u7d39\u4ecb\u3057\u3001\u4e00\u822c\u7684\u306a\u5fdc\u7528\u4e8b\u4f8b\u3084\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7a2e\u985e\u3092\u8aac\u660e\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u308b\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3055\u307e\u3056\u307e\u306a\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u306f\u3053\u306e\u30ac\u30a4\u30c9\u306e\u7bc4\u56f2\u5916\u3067\u3059\u3002\u3088\u308a\u8a73\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u6a5f\u80fd\u306b\u3064\u3044\u3066\u306f\u3001\u516c\u5f0f\u306eMySQL\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u95a2\u3059\u308b\u7ae0\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u306f\u3001\u3055\u307e\u3056\u307e\u306a\u30b7\u30ca\u30ea\u30aa\u306b\u5bfe\u3057\u3066\u7570\u306a\u308b\u30bf\u30a4\u30d7\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30af\u30a8\u30ea\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u3082\u5b66\u3073\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001\u5fc5\u8981\u306a\u5834\u5408\u306b\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u524a\u9664\u65b9\u6cd5\u3082\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h2>\u5358\u4e00\u30ab\u30e9\u30e0\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528<\/h2>\n<p>\u5358\u4e00\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3067\u304d\u308b\u6700\u3082\u4e00\u822c\u7684\u3067\u76f4\u611f\u7684\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5f62\u5f0f\u3067\u3059\u3002\u3053\u306e\u30bf\u30a4\u30d7\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u5358\u4e00\u5217\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u30af\u30a8\u30ea\u306e\u51e6\u7406\u901f\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u5358\u4e00\u5217\u306b\u4f5c\u6210\u3055\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001= \u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u305f\u6b63\u78ba\u306a\u4e00\u81f4\u3084\u3001&gt; \u307e\u305f\u306f &lt; \u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u305f\u6bd4\u8f03\u3092\u542b\u3080\u591a\u304f\u306e\u6761\u4ef6\u4ed8\u304d\u30af\u30a8\u30ea\u306e\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u4f5c\u6210\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u524d\u306b\u3001\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u3078\u306eSELECT\u30af\u30a8\u30ea\u3067WHERE\u53e5\u3092\u4f7f\u7528\u3057\u3066\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u306e\u30b5\u30d6\u30bb\u30c3\u30c8\u306e\u307f\u3092\u8981\u6c42\u3057\u305f\u5834\u5408\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u51e6\u7406\u65b9\u6cd5\u3092\u307e\u305a\u30c6\u30b9\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>\u7d66\u4e0e\u304c\u3061\u3087\u3046\u3069$100,000\u3067\u3042\u308b\u5f93\u696d\u54e1\u3092\u898b\u3064\u3051\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE salary <span class=\"token operator\">=<\/span> <span class=\"token number\">100000<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>WHERE\u53e5\u306f\u3001\u7d66\u4e0e\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u3055\u308c\u305f\u5024\u3068\u4e00\u81f4\u3059\u308b\u5f93\u696d\u54e1\u306e\u6b63\u78ba\u306a\u4e00\u81f4\u3092\u8981\u6c42\u3057\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5fdc\u7b54\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 9 | James | Brown | YZA567 | 100000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 1 row in set (<mark>0.000<\/mark> sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u4e0a\u8a18\u306e\u51fa\u529b\u306b\u793a\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u767a\u884c\u3055\u308c\u305f\u30af\u30a8\u30ea\u306b\u307b\u3068\u3093\u3069\u5373\u5ea7\u306b\u5fdc\u7b54\u3057\u307e\u3057\u305f\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u30b5\u30f3\u30d7\u30eb\u306e\u884c\u304c\u307b\u3093\u306e\u308f\u305a\u304b\u3057\u304b\u306a\u3044\u5834\u5408\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3082\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u76ee\u306b\u898b\u3048\u308b\u5f71\u97ff\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u5834\u5408\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u5f8c\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u5831\u544a\u3055\u308c\u308b\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u6642\u9593\u306b\u306f\u5927\u304d\u306a\u5909\u5316\u304c\u89b3\u5bdf\u3055\u308c\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u30af\u30a8\u30ea\u306e\u51fa\u529b\u304b\u3089\u5224\u65ad\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u304c\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u4e00\u81f4\u3059\u308b\u884c\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306e\u554f\u984c\u306b\u3069\u306e\u3088\u3046\u306b\u30a2\u30d7\u30ed\u30fc\u30c1\u3057\u305f\u306e\u304b\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001MySQL\u306b\u306f\u30af\u30a8\u30ea\u30d7\u30e9\u30f3\uff08\u30a8\u30f3\u30b8\u30f3\u304c\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\uff09\u306b\u5bfe\u3059\u308b\u6d1e\u5bdf\u3092\u5f97\u308b\u65b9\u6cd5\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\uff1aEXPLAIN\u6587\u3002<\/p>\n<p>SELECT \u30af\u30a8\u30ea\u306e\u30af\u30a8\u30ea\u30d7\u30e9\u30f3\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE salary <span class=\"token operator\">=<\/span> <span class=\"token number\">100000<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>EXPLAIN\u30b3\u30de\u30f3\u30c9\u306fMySQL\u306b\u5bfe\u3057\u3066SELECT\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046\u6307\u793a\u3057\u307e\u3059\u304c\u3001\u7d50\u679c\u3092\u8fd4\u3059\u4ee3\u308f\u308a\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u304c\u30af\u30a8\u30ea\u3092\u5185\u90e8\u7684\u306b\u3069\u306e\u3088\u3046\u306b\u51e6\u7406\u3057\u305f\u304b\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306b\u793a\u3059\u5b9f\u884c\u8a08\u753b\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308b\u4e88\u5b9a\u3067\u3059\uff08\u30c6\u30fc\u30d6\u30eb\u306b\u3088\u3063\u3066\u82e5\u5e72\u7570\u306a\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | id | select_type | table | partitions | type | <mark>possible_keys<\/mark> | <mark>key<\/mark> | key_len | ref | <mark>rows<\/mark> | filtered | <mark>Extra<\/mark> | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | ALL | <mark>NULL<\/mark> | <mark>NULL<\/mark> | NULL | NULL | <mark>20<\/mark> | 10.00 | <mark>Using where<\/mark> | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u8868\u306e\u51fa\u529b\u3067\u306f\u3001\u5217\u306f\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u306e\u591a\u304f\u306e\u5074\u9762\u3092\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002\u3054\u4f7f\u7528\u306eMySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u306f\u3001\u8ffd\u52a0\u306e\u5217\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u4ee5\u4e0b\u306e\u6700\u3082\u91cd\u8981\u306a\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>possible_keys lists the indexes that MySQL considered for use. In this case, there are none (NULL).<\/li>\n<li>key describes the index that MySQL decided to use when performing the query. In this case, no index was used (NULL).<\/li>\n<li>rows shows the number of rows that MySQL had to analyze individually before returning the results. Here, it\u2019s 20, which corresponds to the number of all possible rows in the table. This means MySQL had to scan every row in the employees table to find the single one returned.<\/li>\n<li>Extra shows additional, descriptive information on the query plan. In this example, the Using where annotation means that the database filtered results directly from within the table using the WHERE statement.<\/li>\n<\/ul>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5b58\u5728\u3057\u306a\u3044\u305f\u3081\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f1\u3064\u306e\u884c\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b20\u884c\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30c6\u30fc\u30d6\u30eb\u306b\u4f55\u767e\u4e07\u3082\u306e\u884c\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3001MySQL\u306f1\u3064\u305a\u3064\u305d\u308c\u3089\u3092\u901a\u904e\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u4f4e\u4e0b\u3057\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u65b0\u3057\u3044MySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001EXPLAIN\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u51fa\u529b\u306b1\u884c\u306e\u30bb\u30c3\u30c8\u30681\u3064\u306e\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u304c\u3001\u53e4\u3044MySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3084MySQL\u4e92\u63db\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u306f\u5358\u306b1\u884c\u306e\u30bb\u30c3\u30c8\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u8b66\u544a\u306f\u554f\u984c\u306e\u5146\u5019\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002MySQL\u306f\u3001\u30af\u30a8\u30ea\u30d7\u30e9\u30f3\u306b\u95a2\u3059\u308b\u3055\u3089\u306b\u8a73\u7d30\u306a\u60c5\u5831\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u306b\u8b66\u544a\u30e1\u30ab\u30cb\u30ba\u30e0\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u7bc4\u56f2\u5916\u3067\u3053\u308c\u3089\u306e\u8ffd\u52a0\u60c5\u5831\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002MySQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u300c\u62e1\u5f35EXPLAIN\u51fa\u529b\u5f62\u5f0f\u300d\u30da\u30fc\u30b8\u3067\u305d\u306e\u52d5\u4f5c\u306b\u3064\u3044\u3066\u3055\u3089\u306b\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u3055\u3063\u304d\u5b9f\u884c\u3057\u305fSELECT\u30af\u30a8\u30ea\u3067\u306f\u3001\u30af\u30a8\u30ea\u6761\u4ef6\u3068\u3057\u3066exact\u6761\u4ef6\u304c\u4f7f\u7528\u3055\u308c\u307e\u3057\u305f\u3002\u3064\u304e\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u6bd4\u8f03\u6761\u4ef6\u3067\u3082\u540c\u69d8\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002\u7d66\u4e0e\u304c70000\u672a\u6e80\u306e\u5f93\u696d\u54e1\u3092\u53d6\u5f97\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE salary <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">70000<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u56de\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u306f\u3001\u30b8\u30e7\u30f3\u30fb\u30b9\u30df\u30b9\u3068\u30b8\u30a7\u30fc\u30f3\u30fb\u30c9\u30fc\u306e2\u3064\u306e\u884c\u304c\u8fd4\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | ABC123 | 60000 | | 2 | Jane | Doe | DEF456 | 65000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 8 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305f\u3060\u3057\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306bEXPLAIN\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE salary <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">70000<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u524d\u306e\u30af\u30a8\u30ea\u3068\u307b\u307c\u540c\u3058\u30c6\u30fc\u30d6\u30eb\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u3065\u304f\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | ALL | <mark>NULL<\/mark> | <mark>NULL<\/mark> | NULL | NULL | <mark>20<\/mark> | 33.33 | <mark>Using where<\/mark> | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u524d\u56de\u3068\u540c\u69d8\u306b\u3001MySQL\u306f\u30af\u30a8\u30ea\u306eWHERE\u53e5\u3092\u901a\u3058\u3066\u8981\u6c42\u3055\u308c\u305f\u884c\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306b\u30c6\u30fc\u30d6\u30eb\u306e\u516820\u884c\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u307e\u3057\u305f\u3002\u30c6\u30fc\u30d6\u30eb\u5168\u4f53\u306e\u884c\u6570\u306b\u6bd4\u3079\u3066\u8fd4\u3055\u308c\u305f\u884c\u306e\u6570\u306f\u5c11\u306a\u3044\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306f\u305d\u308c\u3089\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306b\u591a\u304f\u306e\u4f5c\u696d\u3092\u884c\u308f\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306e\u7d66\u4e0e\u30c7\u30fc\u30bf\u306b\u7279\u5316\u3057\u305f\u3001\u3055\u3089\u306b\u6700\u9069\u5316\u3055\u308c\u305f\u30c7\u30fc\u30bf\u69cb\u9020\u3092MySQL\u306b\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE INDEX <mark>salary<\/mark> ON <mark>employees<span class=\"token punctuation\">(<\/span>salary<span class=\"token punctuation\">)<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>CREATE INDEX\u6587\u306e\u69cb\u6587\u3067\u306f\u3001\u4ee5\u4e0b\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>The index name, which in this case is salary. The name must be unique within a single table but can repeat across different tables in the same database.<\/li>\n<li>The table name the index is created for. In this case, it is employees.<\/li>\n<li>The list of columns for which the index is created. Here, you\u2019re using a single column called salary to build the index.<\/li>\n<\/ul>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aMySQL\u30e6\u30fc\u30b6\u30fc\u306e\u6a29\u9650\u306b\u3088\u3063\u3066\u306f\u3001CREATE INDEX\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u6642\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\uff1aERROR 1142 (42000): INDEX\u30b3\u30de\u30f3\u30c9\u306f\u3001\u30c6\u30fc\u30d6\u30eb&#8217;employees&#8217;\u306b\u5bfe\u3057\u3066&#8217;user&#8217;@&#8217;host&#8217;\u30e6\u30fc\u30b6\u30fc\u306b\u62d2\u5426\u3055\u308c\u307e\u3057\u305f\u3002\u30e6\u30fc\u30b6\u30fc\u306bINDEX\u306e\u6a29\u9650\u3092\u4ed8\u4e0e\u3059\u308b\u306b\u306f\u3001MySQL\u306broot\u3068\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5fc5\u8981\u306b\u5fdc\u3058\u3066MySQL\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30db\u30b9\u30c8\u3092\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\uff1a<br \/>\nGRANT INDEX on *.* TO &#8216;sammy&#8217;@&#8217;localhost&#8217;;<br \/>\nFLUSH PRIVILEGES;<\/div>\n<p>\u30e6\u30fc\u30b6\u30fc\u306e\u6a29\u9650\u3092\u66f4\u65b0\u3057\u305f\u3089\u3001root\u3068\u3057\u3066\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u3068\u3057\u3066\u518d\u30ed\u30b0\u30a4\u30f3\u3057\u3001CREATE INDEX\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u518d\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u6b63\u5e38\u306b\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.024 sec) Records: 0 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u4ee5\u524d\u306e\u30af\u30a8\u30ea\u3092\u7e70\u308a\u8fd4\u3057\u3066\u4f55\u304b\u5909\u66f4\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305a\u3001\u7d66\u4e0e\u304c100000\u3067\u3042\u308b\u5358\u4e00\u306e\u5f93\u696d\u54e1\u3092\u53d6\u5f97\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE salary <span class=\"token operator\">=<\/span> <span class=\"token number\">100000<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u7d50\u679c\u306f\u4ee5\u524d\u3068\u540c\u69d8\u3067\u3001James Brown\u306e\u307f\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 9 | James | Brown | YZA567 | 100000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 1 row in set (<mark>0.000<\/mark> sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305f\u3060\u3057\u3001MySQL\u306b\u30af\u30a8\u30ea\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u65b9\u6cd5\u3092\u8aac\u660e\u3059\u308b\u3088\u3046\u306b\u4f9d\u983c\u3059\u308b\u3068\u3001\u4ee5\u524d\u3068\u306f\u7570\u306a\u308b\u9055\u3044\u304c\u898b\u3089\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306bEXPLAIN\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE salary <span class=\"token operator\">=<\/span> <span class=\"token number\">100000<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u56de\u3001\u51fa\u529b\u306f\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | ref | <mark>salary<\/mark> | <mark>salary<\/mark> | 5 | const | <mark>1<\/mark> | 100.00 | NULL | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>MySQL\u306f\u3001possible_keys\u306b\u8868\u793a\u3055\u308c\u308b1\u3064\u306e\u53ef\u80fd\u306a\u30ad\u30fc\u304b\u3089\u3001\u4f5c\u6210\u3057\u305fsalary\u3068\u3044\u3046\u540d\u524d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u5ba3\u8a00\u3057\u307e\u3057\u305f\u3002\u884c\u306e\u5217\u306f20\u3067\u306f\u306a\u304f1\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u5168\u3066\u306e\u884c\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u3001\u5373\u5ea7\u306b\u8981\u6c42\u3055\u308c\u305f\u5358\u4e00\u306e\u884c\u3092\u8fd4\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002Extra\u5217\u306f\u3001\u300cWHERE\u3092\u4f7f\u7528\u3059\u308b\u300d\u3068\u306f\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u306a\u305c\u306a\u3089\u3001\u30e1\u30a4\u30f3\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u53cd\u5fa9\u3057\u3001\u30af\u30a8\u30ea\u6761\u4ef6\u306b\u5bfe\u3057\u3066\u5404\u884c\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u5fc5\u8981\u304c\u306a\u304b\u3063\u305f\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u5c0f\u3055\u306a\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3082\u5f71\u97ff\u306f\u3042\u307e\u308a\u76ee\u7acb\u3061\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u7d50\u679c\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u4f5c\u696d\u91cf\u304c\u5c11\u306a\u304f\u306a\u308a\u3001\u3053\u306e\u5909\u66f4\u306e\u52b9\u679c\u306f\u5927\u304d\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u306f\u91cd\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u540c\u3058\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u7d66\u4e0e\u304c70000\u672a\u6e80\u306e\u5f93\u696d\u54e1\u3092\u53d6\u5f97\u3059\u308b2\u756a\u76ee\u306e\u30af\u30a8\u30ea\u3092\u3082\u3046\u4e00\u5ea6\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE salary <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">70000<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b8\u30e7\u30f3\u30fb\u30b9\u30df\u30b9\u3068\u30b8\u30a7\u30fc\u30f3\u30fb\u30c9\u30a6\u306e\u305f\u3081\u306b\u540c\u30582\u884c\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | ABC123 | 60000 | | 2 | Jane | Doe | DEF456 | 65000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 8 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305f\u3060\u3057\u3001\u6b21\u306e\u3088\u3046\u306bEXPLAIN\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u3001<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE salary <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">70000<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u540c\u3058\u30af\u30a8\u30ea\u306e\u524d\u56de\u306e\u5b9f\u884c\u3068\u306f\u7570\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | 1 | SIMPLE | employees | NULL | range | <mark>salary<\/mark> | <mark>salary<\/mark> | 5 | NULL | 2 | 100.00 | <mark>Using index condition<\/mark> | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30ad\u30fc\u30ab\u30e9\u30e0\u306b\u306f\u3001MySQL\u304c\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u305f\u3053\u3068\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u884c\u6570\u3067\u306f\u3001\u7d50\u679c\u3092\u8fd4\u3059\u305f\u3081\u306b\u5206\u6790\u3055\u308c\u305f\u884c\u306f2\u884c\u3060\u3051\u3067\u3057\u305f\u3002\u4eca\u56de\u3001Extra\u30ab\u30e9\u30e0\u306b\u306f\u300cUsing index condition\u300d\u3068\u8868\u793a\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u306f\u3053\u306e\u7279\u5b9a\u306e\u5834\u5408\u306b\u304a\u3044\u3066MySQL\u304c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3057\u3001\u65e2\u306b\u4e00\u81f4\u3057\u305f\u884c\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u4e3b\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u7528\u3057\u305f\u3053\u3068\u3092\u610f\u5473\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\n<p>\u6ce8\u610f\uff1a MySQL\u3067\u306f\u3001\u305f\u3068\u3048\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5b58\u5728\u3057\u4f7f\u7528\u3067\u304d\u308b\u72b6\u614b\u3067\u3042\u3063\u3066\u3082\u3001\u6642\u6298\u305d\u306e\u4f7f\u7528\u3092\u9078\u629e\u3057\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u5834\u5408\uff1a<\/p>\n<p>EXPLAIN SELECT * FROM employees WHERE salary &lt; 140000;<\/p>\n<p>\u5b9f\u884c\u8a08\u753b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u793a\u3055\u308c\u307e\u3059\uff1a<br \/>\nOutput+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |<br \/>\n+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| 1 | SIMPLE | employees | NULL | ALL | salary | NULL | NULL | NULL | 20 | 80.00 | Using where |<br \/>\n+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+<br \/>\n1 \u884c\u304c\u9078\u629e\u3055\u308c\u307e\u3057\u305f\u30011\u3064\u306e\u8b66\u544a\u304c\u3042\u308a\u307e\u3059 (0.00\u79d2)<\/p>\n<p>salary\u304cpossible_keys\u306b\u30ea\u30b9\u30c8\u3055\u308c\u3066\u3044\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001key\u5217\u304c\u7a7a\uff08NULL\uff09\u3067\u3042\u308b\u3053\u3068\u304b\u3089\u3001MySQL\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u306a\u3044\u3053\u3068\u3092\u6c7a\u5b9a\u3057\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u306f20\u884c\u306e\u30b9\u30ad\u30e3\u30f3\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u3053\u3068\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30af\u30a8\u30ea\u30d7\u30e9\u30f3\u30ca\u30fc\u306f\u3001\u30af\u30a8\u30ea\u3054\u3068\u306b\u53ef\u80fd\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5206\u6790\u3057\u3001\u6700\u901f\u306e\u5b9f\u884c\u30d1\u30b9\u3092\u6c7a\u5b9a\u3057\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u30b3\u30b9\u30c8\u304c\u305d\u306e\u4f7f\u7528\u306b\u3088\u308b\u5229\u70b9\u3092\u4e0a\u56de\u308b\u5834\u5408\uff08\u305f\u3068\u3048\u3070\u3001\u30af\u30a8\u30ea\u304c\u5143\u306e\u30c6\u30fc\u30d6\u30eb\u30c7\u30fc\u30bf\u306e\u91cd\u8981\u306a\u90e8\u5206\u3092\u8fd4\u3059\u5834\u5408\uff09\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30d5\u30eb\u30c6\u30fc\u30d6\u30eb\u30b9\u30ad\u30e3\u30f3\u306e\u65b9\u304c\u5b9f\u969b\u306b\u306f\u3088\u308a\u901f\u3044\u3068\u5224\u65ad\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u540c\u69d8\u306b\u3001Extra\u5217\u306e\u6ce8\u91c8\uff08Using index condition\u3084Using where\u306a\u3069\uff09\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u304c\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u305f\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u3092\u793a\u3057\u307e\u3059\u3002\u6587\u8108\u306b\u3088\u3063\u3066\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u65b9\u6cd5\u3092\u5225\u306e\u65b9\u6cd5\u306b\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u3001Using index condition\u306e\u6ce8\u91c8\u304c\u306a\u3044\u5834\u5408\u3084\u3001\u4ed6\u306e\u6ce8\u91c8\u304c\u3042\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u9069\u5207\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u5358\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u884c\u3078\u306e\u30a2\u30af\u30bb\u30b9\u65b9\u6cd5\u3092\u3088\u308a\u52b9\u7387\u7684\u3068\u5224\u65ad\u3057\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<\/div>\n<\/div>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u5358\u4e00\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u4f7f\u7528\u3057\u3066\u3001\u5358\u4e00\u5217\u306b\u5bfe\u3059\u308b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u5fc5\u8981\u3068\u3059\u308bSELECT\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u307e\u3057\u305f\u3002\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4e0e\u3048\u3089\u308c\u305f\u5217\u306e\u5024\u306e\u4e00\u610f\u6027\u3092\u4fdd\u8a3c\u3059\u308b\u305f\u3081\u306b\u3069\u306e\u3088\u3046\u306b\u4f7f\u7528\u3067\u304d\u308b\u304b\u3092\u63a2\u7d22\u3057\u307e\u3059\u3002<\/p>\n<h2>\u91cd\u8907\u30c7\u30fc\u30bf\u3092\u9632\u6b62\u3059\u308b\u305f\u3081\u306b\u3001\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3002<\/h2>\n<p>\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u63a2\u6c42\u3057\u305f\u901a\u308a\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4e00\u822c\u7684\u306a\u4f7f\u7528\u6cd5\u306e\u4e00\u3064\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u304c\u540c\u3058\u7d50\u679c\u3092\u5f97\u308b\u305f\u3081\u306b\u884c\u3046\u4f5c\u696d\u3092\u5c11\u306a\u304f\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30c7\u30fc\u30bf\u306e\u9ad8\u52b9\u7387\u306a\u53d6\u5f97\u3067\u3059\u3002\u307e\u305f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u4e00\u90e8\u5206\u306b\u30c7\u30fc\u30bf\u304c\u7e70\u308a\u8fd4\u3057\u51fa\u73fe\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3082\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5f79\u5272\u3067\u3059\u3002<\/p>\n<p>\u91cd\u8907\u3057\u305f\u5024\u3092\u907f\u3051\u308b\u3053\u3068\u306f\u3001\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u3092\u4fdd\u8a3c\u3059\u308b\u4e0a\u3067\u3057\u3070\u3057\u3070\u5fc5\u8981\u3068\u3055\u308c\u307e\u3059\u3002\u8ad6\u7406\u7684\u307e\u305f\u306f\u6280\u8853\u7684\u306a\u89b3\u70b9\u304b\u3089\u3068\u3082\u306b\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u540c\u3058\u793e\u4f1a\u4fdd\u969c\u756a\u53f7\u3092\u4f7f\u7528\u3059\u308b\u7570\u306a\u308b\u4eba\u3005\u304c\u5b58\u5728\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3057\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u540c\u3058\u30e6\u30fc\u30b6\u30fc\u540d\u3084\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u8907\u6570\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u767b\u9332\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u3079\u304d\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306e\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306e\u4f8b\u3067\u306f\u3001\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30c7\u30d0\u30a4\u30b9\u306e\u30b7\u30ea\u30a2\u30eb\u756a\u53f7\u306f\u91cd\u8907\u3057\u3066\u306f\u306a\u3089\u306a\u3044\u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u3059\u3002\u3082\u3057\u91cd\u8907\u3057\u3066\u3057\u307e\u3063\u305f\u5834\u5408\u3001\u305d\u308c\u306f\u4e8c\u4eba\u306e\u5f93\u696d\u54e1\u304c\u540c\u3058\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3092\u4e0e\u3048\u3089\u308c\u305f\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001\u3053\u306e\u6bb5\u968e\u3067\u306f\u5bb9\u6613\u306b\u540c\u3058\u30b7\u30ea\u30a2\u30eb\u756a\u53f7\u3092\u6301\u3064\u65b0\u3057\u3044\u5f93\u696d\u54e1\u3092\u633f\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3059\u3067\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30c7\u30d0\u30a4\u30b9\u30b7\u30ea\u30a2\u30eb\u756a\u53f7\u3092\u6301\u3064\u5225\u306e\u5f93\u696d\u54e1\u3092\u633f\u5165\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">INSERT INTO employees VALUES <span class=\"token punctuation\">(<\/span><span class=\"token number\">21<\/span>, <span class=\"token string\">&#8216;Sammy&#8217;<\/span>, <span class=\"token string\">&#8216;Smith&#8217;<\/span>, <mark><span class=\"token string\">&#8216;ABC123&#8217;<\/span><\/mark>, <span class=\"token number\">65000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u5fdc\u3058\u3066\u884c\u3092\u633f\u5165\u3057\u3001\u6210\u529f\u3092\u901a\u77e5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 1 row affected (0.009 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305f\u3060\u3057\u3001\u3042\u306a\u305f\u304c\u73fe\u5728\u3001ABCD123\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306e\u5f93\u696d\u54e1\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u3001<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE device_serial <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;ABC123&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u7d50\u679c\u3068\u3057\u3066\u30012\u3064\u306e\u7570\u306a\u308b\u4eba\u7269\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | <mark>ABC123<\/mark> | 60000 | | 21 | Sammy | Smith | <mark>ABC123<\/mark> | 65000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 2 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u5f93\u696d\u54e1\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u6709\u52b9\u306a\u72b6\u614b\u306b\u4fdd\u3064\u4e88\u5b9a\u5916\u306e\u884c\u52d5\u3067\u3059\u3002\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305f\u884c\u3092\u524a\u9664\u3057\u3066\u3001\u3053\u306e\u5909\u66f4\u3092\u5143\u306b\u623b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">DELETE FROM employees <mark>WHERE employee_id <span class=\"token operator\">=<\/span> <span class=\"token number\">21<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u524d\u306eSELECT\u30af\u30a8\u30ea\u3092\u518d\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE device_serial <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;ABC123&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u518d\u3073\u3001\u30b7\u30ea\u30a2\u30eb\u756a\u53f7\u304cABC123\u306e\u30c7\u30d0\u30a4\u30b9\u306fJohn Smith\u3060\u3051\u304c\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | ABC123 | 60000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 1 row in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u3088\u3046\u306a\u30df\u30b9\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u3001device_serial\u5217\u306b\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u3001\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE <mark>UNIQUE<\/mark> INDEX <mark>device_serial<\/mark> ON <mark>employees<span class=\"token punctuation\">(<\/span>device_serial<span class=\"token punctuation\">)<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u969b\u306bUNIQUE\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306fdevice_serial\u5217\u306e\u5024\u304c\u7e70\u308a\u8fd4\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u78ba\u8a8d\u3057\u307e\u3059\u3002\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u308b\u3059\u3079\u3066\u306e\u65b0\u3057\u3044\u884c\u306f\u3001\u5217\u306e\u5024\u304c\u5236\u7d04\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u7167\u5408\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f5c\u6210\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.021 sec) Records: 0 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3055\u3066\u3001\u30c6\u30fc\u30d6\u30eb\u306b\u91cd\u8907\u3057\u305f\u30a8\u30f3\u30c8\u30ea\u3092\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002\u4ee5\u524d\u6210\u529f\u3057\u305fINSERT\u30af\u30a8\u30ea\u3092\u518d\u5ea6\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">INSERT INTO employees VALUES <span class=\"token punctuation\">(<\/span><span class=\"token number\">21<\/span>, <span class=\"token string\">&#8216;Sammy&#8217;<\/span>, <span class=\"token string\">&#8216;Smith&#8217;<\/span>, <mark><span class=\"token string\">&#8216;ABC123&#8217;<\/span><\/mark>, <span class=\"token number\">65000<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u56de\u306f\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>ERROR 1062 (23000): Duplicate entry <mark>&#8216;ABC123&#8217;<\/mark> for key &#8216;device_serial&#8217;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u518d\u5ea6SELECT\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u65b0\u3057\u3044\u884c\u304c\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3044\u306a\u3044\u304b\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE device_serial <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;ABC123&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u306f\u4e00\u3064\u306e\u884c\u304c\u8fd4\u3055\u308c\u3066\u3044\u307e\u3059\u3002 (Ima wa hitotsu no gy\u014d ga kaesareteimasu.)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | ABC123 | 60000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 1 row in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u91cd\u8907\u3057\u305f\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u9632\u3050\u3060\u3051\u3067\u306a\u304f\u3001\u30af\u30a8\u30ea\u306e\u9ad8\u901f\u5316\u306e\u305f\u3081\u306e\u5b8c\u5168\u306a\u6a5f\u80fd\u7684\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u3082\u3042\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306f\u3001\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u3068\u540c\u3058\u3088\u3046\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u308c\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">EXPLAIN SELECT * FROM employees <mark>WHERE device_serial <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;ABC123&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306e\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff08\u30c6\u30fc\u30d6\u30eb\u306f\u5c11\u3057\u7570\u306a\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | const | <mark>device_serial<\/mark> | <mark>device_serial<\/mark> | 63 | const | <mark>1<\/mark> | 100.00 | NULL | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u554f\u3044\u5408\u308f\u305b\u3092\u5b9f\u884c\u3059\u308b\u969b\u3001possible_keys\u304a\u3088\u3073key\u30ab\u30e9\u30e0\u306e\u4e21\u65b9\u306bdevice_serial\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306e\u91cd\u8907\u30c7\u30fc\u30bf\u3092\u9632\u3050\u305f\u3081\u306b\u3001\u30e6\u30cb\u30fc\u30af\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u8907\u6570\u306e\u5217\u306b\u307e\u305f\u304c\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>\u8907\u6570\u306e\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b<\/h2>\n<p>\u3053\u308c\u307e\u3067\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u4f5c\u6210\u3057\u305f\u3059\u3079\u3066\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u9078\u629e\u3057\u305f\u5217\u306e\u5024\u306b\u95a2\u9023\u3059\u308b\u4e00\u3064\u306e\u5217\u540d\u3092\u4f7f\u7528\u3057\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u307b\u3068\u3093\u3069\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u306f\u3001\u8907\u6570\u306e\u5217\u306b\u307e\u305f\u304c\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u30de\u30eb\u30c1\u30ab\u30e9\u30e0\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u547c\u3070\u308c\u3001\u8907\u6570\u306e\u5217\u306e\u5024\u3092\u5358\u4e00\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u683c\u7d0d\u3059\u308b\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u304c\u30bb\u30c3\u30c8\u306e\u5217\u3092\u4e00\u7dd2\u306b\u4f7f\u7528\u3057\u3066\u30af\u30a8\u30ea\u3092\u3088\u308a\u8fc5\u901f\u304b\u3064\u52b9\u7387\u7684\u306b\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u6027\u80fd\u3092\u6700\u9069\u5316\u3059\u3079\u304d\u983b\u7e41\u306b\u4f7f\u7528\u3055\u308c\u308b\u30af\u30a8\u30ea\u3067\u306f\u3001WHERE\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u53e5\u3067\u8907\u6570\u306e\u6761\u4ef6\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30af\u30a8\u30ea\u306e\u4f8b\u3068\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u540d\u524d\u3068\u59d3\u306e\u4e21\u65b9\u3067\u4eba\u7269\u3092\u691c\u7d22\u3059\u308b\u3088\u3046\u306b\u8981\u6c42\u3059\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE last_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Smith&#8217;<\/span> AND first_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;John&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u30af\u30a8\u30ea\u3092\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u3066\u6700\u9069\u5316\u3059\u308b\u6700\u521d\u306e\u8003\u3048\u306f\u3001last_name\u3068\u3044\u3046\u5217\u306b1\u3064\u3001first_name\u3068\u3044\u3046\u5217\u306b\u3082\u30461\u3064\u306e\u500b\u5225\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u72b6\u6cc1\u306b\u306f\u6700\u9069\u306a\u9078\u629e\u80a2\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b2\u3064\u306e\u5225\u3005\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u305f\u5834\u5408\u3001MySQL\u306fSmith\u3068\u3044\u3046\u540d\u524d\u306e\u3059\u3079\u3066\u306e\u5f93\u696d\u54e1\u3092\u898b\u3064\u3051\u308b\u65b9\u6cd5\u3092\u77e5\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001John\u3068\u3044\u3046\u540d\u524d\u306e\u3059\u3079\u3066\u306e\u5f93\u696d\u54e1\u3092\u898b\u3064\u3051\u308b\u65b9\u6cd5\u3082\u77e5\u3063\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001John Smith\u3068\u3044\u3046\u540d\u524d\u306e\u4eba\u3092\u898b\u3064\u3051\u308b\u65b9\u6cd5\u3092\u77e5\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\uff12\u3064\u306e\u500b\u5225\u306e\u7d22\u5f15\u3092\u6301\u3064\u554f\u984c\u3092\u8aac\u660e\u3059\u308b\u305f\u3081\u306b\u3001\u59d3\u3067\u6574\u7406\u3055\u308c\u305f\uff11\u3064\u306e\u96fb\u8a71\u5e33\u3068\u540d\u524d\u3067\u6574\u7406\u3055\u308c\u305f\u3082\u3046\uff11\u3064\u306e\u96fb\u8a71\u5e33\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4e21\u65b9\u306e\u96fb\u8a71\u5e33\u306f\u305d\u308c\u305e\u308c\u59d3\u3068\u540d\u524d\u306e\u5217\u3067\u4f5c\u6210\u3055\u308c\u305f\u7d22\u5f15\u306b\u4f3c\u3066\u3044\u307e\u3059\u3002\u96fb\u8a71\u5e33\u306e\u5229\u7528\u8005\u3068\u3057\u3066\u3001John Smith\u3092\u898b\u3064\u3051\u308b\u554f\u984c\u306b\u306f\u4ee5\u4e0b\u306e\uff13\u3064\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Use the phone book ordered by last names to find all people named Smith, ignore the second phone book, and manually traverse all Smith people one by one until you find John Smith.<\/li>\n<li>Do the opposite: use the phone book ordered by first names to find all people named John, ignore the second phone book, and manually traverse all John people one by one until you find John Smith.<\/li>\n<li>Try to use both phone books together: find all people named John and separately all people named Smith, write the interim results down, and try to manually intersect the two subsets of data looking for people that are on both individual lists.<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u624b\u6cd5\u306e\u3044\u305a\u308c\u3082\u7406\u60f3\u7684\u3067\u306f\u306a\u304f\u3001MySQL\u306b\u306f\u8907\u6570\u306e\u975e\u9023\u7d9a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u8907\u6570\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u6761\u4ef6\u3092\u8981\u6c42\u3059\u308b\u30af\u30a8\u30ea\u306b\u5bfe\u3057\u3066\u4f3c\u305f\u3088\u3046\u306a\u9078\u629e\u80a2\u304c\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3082\u3046\u4e00\u3064\u306e\u65b9\u6cd5\u306f\u30011\u3064\u306e\u5217\u3067\u306f\u306a\u304f\u8907\u6570\u306e\u5217\u3092\u8003\u616e\u306b\u5165\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3053\u308c\u306f\u3001\u3082\u3046\u4e00\u3064\u306e\u96fb\u8a71\u5e33\u306e\u4e2d\u306b\u96fb\u8a71\u5e33\u304c\u3042\u308b\u3068\u60f3\u50cf\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305a\u3001\u59d3\u304cSmith\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u691c\u7d22\u3057\u3001\u305d\u308c\u306b\u3088\u3063\u3066\u540d\u524d\u3067\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u306b\u4e26\u3079\u3089\u308c\u305fSmith\u3055\u3093\u306e\u3059\u3079\u3066\u306e\u4eba\u3005\u306e\u30bb\u30ab\u30f3\u30c9\u30ab\u30bf\u30ed\u30b0\u306b\u305f\u3069\u308a\u7740\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30ab\u30bf\u30ed\u30b0\u3092\u4f7f\u7528\u3057\u3066John\u3092\u7d20\u65e9\u304f\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aMySQL\u3067\u306f\u3001\u30af\u30a8\u30ea\u3067\u4f7f\u7528\u3055\u308c\u308b\u30c6\u30fc\u30d6\u30eb\u3054\u3068\u306b1\u3064\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3057\u304b\u4f7f\u7528\u3067\u304d\u306a\u3044\u3068\u3088\u304f\u8a00\u308f\u308c\u3066\u3044\u307e\u3059\u3002MySQL\u306f\u3001\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u969b\u306b\u8907\u6570\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5171\u540c\u3057\u3066\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30de\u30fc\u30b8\u6700\u9069\u5316\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u308c\u306f\u5e38\u306b\u771f\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u5236\u9650\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u69cb\u7bc9\u3059\u308b\u969b\u306e\u4e00\u822c\u7684\u306a\u6307\u91dd\u3068\u306a\u308a\u307e\u3059\u3002MySQL\u306f\u8907\u6570\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u306a\u3044\u3053\u3068\u3092\u6c7a\u5b9a\u3059\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u4f7f\u7528\u3057\u3066\u3044\u3066\u3082\u3001\u591a\u304f\u306e\u30b7\u30ca\u30ea\u30aa\u3067\u306f\u3001\u5c02\u7528\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u540c\u69d8\u306b\u5f79\u7acb\u305f\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<p>MySQL\u3067\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306e\u59d3\u3068\u540d\u306b\u5bfe\u3057\u3066\u30de\u30eb\u30c1\u30ab\u30e9\u30e0\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE INDEX <mark>names<\/mark> ON <mark>employees<span class=\"token punctuation\">(<\/span>last_name, first_name<span class=\"token punctuation\">)<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u5834\u5408\u3001CREATE INDEX\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u5c11\u3057\u7570\u306a\u308a\u307e\u3059\u3002\u30c6\u30fc\u30d6\u30eb\u540d\uff08employees\uff09\u306e\u5f8c\u306e\u30ab\u30c3\u30b3\u5185\u306b\u3001last_name\u3068first_name\u306e2\u3064\u306e\u5217\u304c\u30ea\u30b9\u30c8\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4e21\u65b9\u306e\u5217\u306b\u5bfe\u3057\u3066\u8907\u6570\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5b9a\u7fa9\u3067\u5217\u304c\u30ea\u30b9\u30c8\u3055\u308c\u308b\u9806\u5e8f\u304c\u91cd\u8981\u3067\u3059\u3002\u3059\u3050\u306b\u308f\u304b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u6b21\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u4f5c\u6210\u304c\u6210\u529f\u3057\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.024 sec) Records: 0 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3044\u307e\u3001SELECT\u30af\u30a8\u30ea\u3092\u767a\u884c\u3057\u3066\u3001\u540d\u524d\u304cJohn\u3001\u59d3\u304cSmith\u306b\u4e00\u81f4\u3059\u308b\u884c\u3092\u898b\u3064\u3051\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE last_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Smith&#8217;<\/span> AND first_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;John&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u7d50\u679c\u306f\u3001\u5f93\u696d\u54e1\u306e\u540d\u524d\u304c\u30b8\u30e7\u30f3\u30fb\u30b9\u30df\u30b9\u3067\u3042\u308b\u4e00\u3064\u306e\u884c\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | ABC123 | 60000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 1 row in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Now use the EXPLAIN query to check whether the index was used:<br \/>\n\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u305f\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001EXPLAIN\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE last_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Smith&#8217;<\/span> AND first_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;John&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u5b9f\u884c\u8a08\u753b\u306f\uff08\u30c6\u30fc\u30d6\u30eb\u306f\u5c11\u3057\u7570\u306a\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\uff09\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | ref | <mark>names<\/mark> | <mark>names<\/mark> | 406 | const,const | <mark>1<\/mark> | 100.00 | NULL | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u540d\u524d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u30021\u3064\u306e\u884c\u304c\u30b9\u30ad\u30e3\u30f3\u3055\u308c\u3001\u8868\u306f\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u30c8\u30e9\u30d0\u30fc\u30b9\u306e\u307f\u3067\u51e6\u7406\u3055\u308c\u307e\u3057\u305f\u3002Extra\u5217\u306b\u306f\u300c\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u6761\u4ef6\u3092\u4f7f\u7528\u4e2d\u300d\u3068\u8868\u793a\u3055\u308c\u3001MySQL\u304c\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u5b8c\u5168\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u307f\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u540d\u524d\u306e\u5148\u982d\u3068\u672b\u5c3e\u306e\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3092\u884c\u3044\u3001\u3053\u308c\u3089\u306e2\u3064\u306e\u5217\u306b\u308f\u305f\u308b\u30de\u30eb\u30c1\u30ab\u30e9\u30e0\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u76ee\u7684\u306e\u7d50\u679c\u3092\u76f4\u63a5\u304b\u3064\u8fc5\u901f\u306b\u898b\u3064\u3051\u308b\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e21\u65b9\u306e\u5217\u306b\u5b9a\u7fa9\u3055\u308c\u305f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u5834\u5408\u3001\u540d\u524d\u304cSmith\u3067\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u540d\u524d\u4ee5\u5916\u3067\u884c\u308f\u308c\u306a\u3044\u5834\u5408\u3001\u3069\u3046\u306a\u308a\u307e\u3059\u304b\uff1f\u4fee\u6b63\u3055\u308c\u305f\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE last_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Smith&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u7d50\u679c\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 20 | Abigail | Smith | FGH890 | 155000 | | 17 | Daniel | Smith | WXY901 | 140000 | | 1 | John | Smith | ABC123 | 60000 | | 5 | Michael | Smith | MNO345 | 80000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 4 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u56db\u4eba\u306e\u5f93\u696d\u54e1\u304c\u59d3\u3092\u30b9\u30df\u30b9\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3082\u3046\u4e00\u5ea6\u3001\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u8a08\u753b\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE last_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Smith&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306b\u793a\u3059\u5b9f\u884c\u8a08\u753b\u306f\u3001\u4ee5\u4e0b\uff08\u30c6\u30fc\u30d6\u30eb\u306f\u82e5\u5e72\u7570\u306a\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u304c\uff09\u3068\u985e\u4f3c\u3059\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | ref | <mark>names<\/mark> | <mark>names<\/mark> | 203 | const | <mark>4<\/mark> | 100.00 | NULL | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;-+ 1 row in set, 1 warning (0.01 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u56de\u306f\u3001\u540c\u3058\u59d3\u3092\u6301\u3064\u5f93\u696d\u54e1\u304c\u8907\u6570\u3044\u305f\u305f\u3081\u30014\u884c\u304c\u8fd4\u3055\u308c\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u5b9f\u884c\u8a08\u753b\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u3088\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3053\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u3001\u8907\u6570\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u540d\u524d\u3092\u4f7f\u7528\u3057\u3001\u8fd4\u3055\u308c\u305f\u6b63\u78ba\u306a\u6570\u3067\u3042\u308b4\u884c\u306e\u307f\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u524d\u306e\u30af\u30a8\u30ea\u3067\u306f\u3001\u7d50\u679c\u3092\u7d5e\u308a\u8fbc\u3080\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u30ab\u30e9\u30e0\uff08last_name\uff09\u304c\u6700\u521d\u306bCREATE INDEX\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u3001\u8907\u6570\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30ab\u30e9\u30e0\u30ea\u30b9\u30c8\u30672\u756a\u76ee\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u305ffirst_name\u3067employees\u30c6\u30fc\u30d6\u30eb\u3092\u7d5e\u308a\u8fbc\u307f\u307e\u3059\u3002\u6b21\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT * FROM employees <mark>WHERE first_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;John&#8217;<\/span><\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u51fa\u529b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8fd4\u3055\u308c\u307e\u3059:<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | employee_id | first_name | last_name | device_serial | salary | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ | 1 | John | Smith | ABC123 | 60000 | +&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8211;+ 1 row in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30af\u30a8\u30ea\u306e\u5b9f\u884c\u8a08\u753b\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\"><mark>EXPLAIN<\/mark> SELECT * FROM employees WHERE first_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;John&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u51fa\u529b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | 1 | SIMPLE | employees | NULL | ALL | <mark>NULL<\/mark> | <mark>NULL<\/mark> | NULL | NULL | <mark>20<\/mark> | 10.00 | Using where | +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ 1 row in set, 1 warning (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u518d\u5ea6\u3001\u8fd4\u3055\u308c\u305f\u7d50\u679c\u306b\u306f1\u4eba\u306e\u5f93\u696d\u54e1\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30c6\u30fc\u30d6\u30eb\u5168\u4f53\u3092\u30b9\u30ad\u30e3\u30f3\u3057\u3001Extra\u5217\u306e\u300cUsing where\u300d\u306e\u6ce8\u91c8\u308420\u884c\u306e\u30b9\u30ad\u30e3\u30f3\u7d50\u679c\u306b\u3088\u3063\u3066\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5834\u5408\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u6700\u521d\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u305f\u3068\u304d\u306b\u4f7f\u7528\u3055\u308c\u305f\u5217\u306e\u9806\u5e8f\u306e\u305f\u3081\u306b\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u307e\u305b\u3093\u3067\u3057\u305f\uff1a\u59d3\u3001\u540d\u3002\u30af\u30a8\u30ea\u304c\u6700\u521d\u306e\u5217\u307e\u305f\u306f\u6700\u521d\u306e\u5217\u30682\u756a\u76ee\u306e\u5217\u306e\u4e21\u65b9\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306e\u307f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5b9a\u7fa9\u306e\u6700\u521d\u306e\u5217\u304c\u4f7f\u7528\u3055\u308c\u306a\u3044\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u5bfe\u3059\u308b\u30af\u30a8\u30ea\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u8907\u6570\u5217\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5316\u3055\u308c\u305f\u3059\u3079\u3066\u306e\u5217\u304b\u3001\u5de6\u5074\u304b\u3089\u9806\u306b\u5897\u3048\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5316\u3055\u308c\u305f\u5217\u306e\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u304c\u95a2\u4e0e\u3059\u308b\u30af\u30a8\u30ea\u306e\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u5217\uff08a\u3001b\u3001c\uff09\u3092\u542b\u3080\u8907\u6570\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u3001\u3059\u3079\u3066\u306e\u4e09\u3064\u306e\u5217\u3092\u95a2\u4e0e\u3059\u308b\u30af\u30a8\u30ea\u3084\u6700\u521d\u306e\u4e8c\u3064\u306e\u5217\u3092\u95a2\u4e0e\u3059\u308b\u30af\u30a8\u30ea\u3001\u3055\u3089\u306b\u6700\u521d\u306e\u5217\u306e\u307f\u3092\u95a2\u4e0e\u3059\u308b\u30af\u30a8\u30ea\u306e\u51e6\u7406\u3092\u9ad8\u901f\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u6700\u5f8c\u306e\u5217c\u306e\u307f\u3084\u3001\u6700\u5f8c\u306e\u4e8c\u3064\u306e\u5217b\u3068c\u306e\u307f\u3092\u95a2\u4e0e\u3059\u308b\u30af\u30a8\u30ea\u3067\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u52b9\u679c\u3092\u767a\u63ee\u3057\u307e\u305b\u3093\u3002<\/p>\n<p>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u542b\u307e\u308c\u308b\u5217\u3068\u305d\u306e\u9806\u5e8f\u3092\u614e\u91cd\u306b\u9078\u3076\u3053\u3068\u3067\u3001\u540c\u3058\u30c6\u30fc\u30d6\u30eb\u4e0a\u306e\u3055\u307e\u3056\u307e\u306a\u30af\u30a8\u30ea\u3092\u9ad8\u901f\u5316\u3059\u308b\u305f\u3081\u306b\u5358\u4e00\u306e\u591a\u5217\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u5f93\u696d\u54e1\u306e\u691c\u7d22\u304c\u540d\u524d\u3068\u59d3\u306e\u4e21\u65b9\u307e\u305f\u306f\u59d3\u306e\u307f\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u308b\u5834\u5408\u3001\u540d\u524d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u63d0\u4f9b\u3055\u308c\u308b\u5217\u306e\u9806\u5e8f\u306f\u3001\u95a2\u9023\u3059\u308b\u3059\u3079\u3066\u306e\u30af\u30a8\u30ea\u3092\u9ad8\u901f\u5316\u3059\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30de\u30eb\u30c1\u30ab\u30e9\u30e0\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3001\u305d\u306e\u3088\u3046\u306a\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u6307\u5b9a\u3059\u308b\u969b\u306e\u5217\u306e\u9806\u5e8f\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3057\u305f\u3002\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u65e2\u5b58\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u7ba1\u7406\u65b9\u6cd5\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h2>\u65e2\u5b58\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u30ea\u30b9\u30c8\u5316\u3068\u524a\u9664<\/h2>\n<p>\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u3001\u65b0\u3057\u3044\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u306f\u540d\u524d\u304c\u3042\u308a\u3001\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u5fc5\u8981\u306a\u3068\u304d\u306b\u306f\u30ea\u30b9\u30c8\u30a2\u30c3\u30d7\u3057\u3066\u64cd\u4f5c\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u4f5c\u6210\u3057\u305f\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306e\u3059\u3079\u3066\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u30ea\u30b9\u30c8\u3059\u308b\u306b\u306f\u3001\u6b21\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SHOW INDEXES FROM <mark>employees<\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4e0b\u8a18\u306e\u51fa\u529b\u306f\u540c\u3058\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression | +&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+ | employees | 0 | device_serial | 1 | device_serial | A | 20 | NULL | NULL | YES | BTREE | | | YES | NULL | | employees | 1 | salary | 1 | salary | A | 20 | NULL | NULL | YES | BTREE | | | YES | NULL | | employees | 1 | names | 1 | last_name | A | 16 | NULL | NULL | YES | BTREE | | | YES | NULL | | employees | 1 | names | 2 | first_name | A | 20 | NULL | NULL | YES | BTREE | | | YES | NULL | +&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;+ 4 rows in set (0.01 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3042\u306a\u305f\u306eMySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066\u591a\u5c11\u7570\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u51fa\u529b\u306b\u306f\u5168\u3066\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u305d\u308c\u306b\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u540d\u79f0\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u5217\u3001\u4e00\u610f\u6027\u306e\u60c5\u5831\u3001\u304a\u3088\u3073\u305d\u306e\u4ed6\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u5b9a\u7fa9\u306e\u8a73\u7d30\u304c\u5e83\u7bc4\u306b\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<p>\u65e2\u5b58\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u3001DROP INDEX SQL\u6587\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002device_serial\u5217\u3067\u4e00\u610f\u6027\u3092\u5f37\u5236\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\u5834\u5408\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u305f\u3081\u3001device_serial\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u4e0d\u8981\u306b\u306a\u308a\u307e\u3059\u3002\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">DROP INDEX <mark>device_serial<\/mark> ON <mark>employees<\/mark><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30d0\u30a4\u30b9\u30b7\u30ea\u30a2\u30eb\u306f\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u540d\u3067\u3001\u5f93\u696d\u54e1\u306f\u305d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u524a\u9664\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.018 sec) Records: 0 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6642\u6298\u3001\u5178\u578b\u7684\u306a\u30af\u30a8\u30ea\u306e\u30d1\u30bf\u30fc\u30f3\u306f\u5909\u5316\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3057\u3001\u65b0\u3057\u3044\u30af\u30a8\u30ea\u306e\u7a2e\u985e\u304c\u6ce8\u76ee\u3055\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u518d\u8a55\u4fa1\u3057\u305f\u308a\u3001\u65b0\u3057\u3044\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u305f\u308a\u3001\u4f7f\u308f\u308c\u3066\u3044\u306a\u3044\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u524a\u9664\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u4f4e\u4e0b\u3092\u9632\u3050\u305f\u3081\u3001\u5e38\u306b\u6700\u65b0\u306e\u72b6\u614b\u306b\u4fdd\u3064\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>CREATE INDEX \u3068 DROP INDEX \u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5fc5\u8981\u3067\u6709\u76ca\u3068\u5224\u65ad\u3055\u308c\u305f\u5834\u5408\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u5f93\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306b\u5f93\u3046\u3053\u3068\u3067\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3068\u306f\u4f55\u304b\u3001\u305d\u3057\u3066MySQL\u3067\u6700\u3082\u4e00\u822c\u7684\u306a\u30bf\u30a4\u30d7\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u6761\u4ef6\u4ed8\u304dSELECT\u30af\u30a8\u30ea\u3092\u901a\u3058\u3066\u30c7\u30fc\u30bf\u691c\u7d22\u3092\u9ad8\u901f\u5316\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u5217\u30c7\u30fc\u30bf\u306e\u4e00\u610f\u6027\u3092\u7dad\u6301\u3057\u3001\u8907\u6570\u306e\u5217\u304c\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u6761\u4ef6\u306b\u4f7f\u7528\u3055\u308c\u308b\u30af\u30a8\u30ea\u306b\u3069\u306e\u3088\u3046\u306b\u5f71\u97ff\u3059\u308b\u304b\u3092\u5b66\u3073\u307e\u3057\u305f\u3002<\/p>\n<p>\u3088\u304f\u5b9f\u884c\u3055\u308c\u308b\u30af\u30a8\u30ea\u306e\u30bf\u30a4\u30d7\u306b\u5fdc\u3058\u3066\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u8abf\u6574\u3059\u308b\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4e00\u822c\u7684\u306a\u4f7f\u7528\u30b1\u30fc\u30b9\u306e\u8aad\u307f\u53d6\u308a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u66f8\u304d\u8fbc\u307f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u9069\u5207\u306a\u30d0\u30e9\u30f3\u30b9\u3092\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u305d\u306e\u76ee\u7684\u306e\u305f\u3081\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306e\u57fa\u790e\u306e\u307f\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u307e\u3059\u3002MySQL\u304c\u3069\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001\u3044\u3064\u4f7f\u7528\u3059\u308b\u304b\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u8907\u96d1\u306a\u30af\u30a8\u30ea\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001MySQL\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u95a2\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3082\u3057SQL\u8a00\u8a9e\u306b\u95a2\u3059\u308b\u7570\u306a\u308b\u30b3\u30f3\u30bb\u30d7\u30c8\u3084\u305d\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u3082\u3063\u3068\u5b66\u3073\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u4ed6\u306e\u300cSQL\u306e\u4f7f\u3044\u65b9\u300d\u30b7\u30ea\u30fc\u30ba\u306e\u30ac\u30a4\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8457\u8005\u306f\u300cWrite for Donations\u300d\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001\u5bc4\u4ed8\u91d1\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306bDiversity in Tech Fund\u3092\u9078\u3073\u307e\u3057\u305f\u3002 \u30a4\u30f3\u30c8\u30ed\u30c0\u30af\u30b7\u30e7\u30f3 \u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u6570\u767e\u4e07\u884c\u3092\u6709\u3059\u308b\u5927\u898f\u6a21\u306a\u30c7 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14,26],"class_list":["post-512","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-14","tag-26"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/mysql\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/mysql\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-21T01:25:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T15:10:06+00:00\" \/>\n<meta name=\"author\" content=\"\u6d77\u6597, \u8475\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6d77\u6597, \u8475\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"60\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-10-21T01:25:59+00:00\",\"dateModified\":\"2025-07-31T15:10:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\"},\"description\":\"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\",\"name\":\"\u6d77\u6597, \u8475\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"caption\":\"\u6d77\u6597, \u8475\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","description":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/mysql\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5","og_description":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/mysql\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-10-21T01:25:59+00:00","article_modified_time":"2025-07-31T15:10:06+00:00","author":"\u6d77\u6597, \u8475","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u6d77\u6597, \u8475","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"60\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-10-21T01:25:59+00:00","dateModified":"2025-07-31T15:10:06+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6"},"description":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"MySQL\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u306e\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6","name":"\u6d77\u6597, \u8475","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","caption":"\u6d77\u6597, \u8475"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/mysql%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=512"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/512\/revisions"}],"predecessor-version":[{"id":325802,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/512\/revisions\/325802"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}