• mysql慢查询优化之explain的各列含义


    mysql> explain select customer_id,first_name,last_name from customer;
    +----+-------------+----------+------+---------------+------+---------+------+------+-------+
    | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
    +----+-------------+----------+------+---------------+------+---------+------+------+-------+
    | 1 | SIMPLE | customer | ALL | NULL | NULL | NULL | NULL | 599 | NULL |
    +----+-------------+----------+------+---------------+------+---------+------+------+-------+
    1 row in set (0.00 sec)

     返回各列的含义
    extra列需要注意的返回值
    Using filesort:看到这个的时候,查询就需要优化了
    Using temporary 看到这个的时候,也需要优化,

    http://www.imooc.com/video/3710

    笔记

    mysql> explain select max(payment_date) from paymentG
    *************************** 1. row ***************************
               id: 1
      select_type: SIMPLE
            table: payment
             type: ALL
    possible_keys: NULL
              key: NULL
          key_len: NULL
              ref: NULL
             rows: 16086
            Extra: NULL
    1 row in set (0.00 sec)
    
    mysql> 
  • 相关阅读:
    福大软工 · 第十二次作业
    Beta 冲刺(7/7)
    Beta 冲刺(6/7)
    Beta 冲刺(5/7)
    Beta 冲刺(4/7)
    Beta 冲刺(3/7)
    Beta 冲刺(2/7)
    福大软工 · 第十次作业
    Beta 冲刺(1/7)
    64位 CentOS NDK 编译 FFMPEG
  • 原文地址:https://www.cnblogs.com/walter371/p/4170700.html
Copyright © 2020-2023  润新知