Home  >  Q&A  >  body text

mysql - 主键索引类型是整形,那么汉子,可以做普通索引吗?

索引到底有什么用,听说能提高查询效率?

select id,uname,passwd from user;

如果我在uname字段建立了普通索引,那么经过怎样的查询后就能提高速度;

请好好讲讲!

高洛峰高洛峰2742 days ago623

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-17 14:39:54

    Indexes are generally used in where or table association conditions to improve query efficiency. If you simply select username from user, it will scan the entire table.

    reply
    0
  • Cancelreply