MYSQL查询优化

  1. explain分析
    type:
    system: 系统表,表里只有一行数据
    const: 使用主键或唯一索引等值查询
    eq_ref: 使用主键索引或唯一索引等值表连接
    ref: 非唯一性索引等值查询
    ref_or_null: 非唯一性索引,包含null值

  2. 冗余字段

posted @ 2022-10-10 03:02  笑笑ai  阅读(12)  评论(0)    收藏  举报