设为首页 加入收藏

TOP

表数据量影响MySQL索引选择(六)
2018-10-28 16:08:23 】 浏览:699
Tags:数据 影响 MySQL 索引 选择
                    "rows_to_scan": 6,
                      "access_type": "scan",
                      "resulting_rows": 6,
                      "cost": 2.2,
                      "chosen": true
                    }
                  ]
                },
                //因此选择了成本更低的scan
                "condition_filtering_pct": 100,
                "rows_for_plan": 6,
                "cost_for_plan": 2.2,
                "chosen": true
              }
            ]
          },
          {
            "attaching_conditions_to_tables": {
              "original_condition": "((`staffs`.`age` = 23) and (`staffs`.`name` = 'July'))",
              "attached_conditions_computation": [
              ],
              "attached_conditions_summary": [
                {
                  "table": "`staffs`",
                  "attached": "((`staffs`.`age` = 23) and (`staffs`.`name` = 'July'))"
                }
              ]
            }
          },
          {
            "refine_plan": [
              {
                "table": "`staffs`"
              }
            ]
          }
        ]
      }
    },
    {
      "join_execution": {
        "select#": 1,
        "steps": [
        ]
      }
    }
  ]
}


增加表数据量
-- 接下来增大表的数据量
INSERT INTO `staffs` (`name`, `age`, `pos`, `add_time`)
VALUES
    ('July', 25, 'dev', '2018-06-04 16:30:17'),
    ('July', 23, 'dev1', '2018-06-04 16:02:02'),
    ('July', 23, 'dev2', '2018-06-04 16:02:02'),
    ('July', 23, 'dev3', '2018-06-04 16:02:02'),
    ('July', 23, 'dev4', '2018-06-04 16:02:02'),
    ('July', 23, 'dev6', '2018-06-04 16:02:0

首页 上一页 3 4 5 6 7 8 9 下一页 尾页 6/10/10
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MongoDB 与 MySQL,你选择谁? 下一篇MySQL ORDER BY主键id加LIMIT限制..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目