V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
uselessVisitor
V2EX  ›  MySQL

索引问题

  •  
  •   uselessVisitor · 2021-04-14 17:25:51 +08:00 · 864 次点击
    这是一个创建于 1079 天前的主题,其中的信息可能已经有所发展或是发生改变。

    网上搜的资料都说 not/<>都不走索引。。
    实际上我测试如果为 int/tinyint 类型 explain 的 type = ranger
    当类型为 varchar 时 type = all
    表结构
    表结构.png
    使用 id,主键索引
    id_index.png
    使用 username,普通索引
    username_index.png

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1063 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 19:05 · PVG 03:05 · LAX 12:05 · JFK 15:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.