mysql使用索引, 用存储过程检验

来源:互联网 发布:广西广电网络投诉 编辑:程序博客网 时间:2024/05/22 08:01

1。索引
查看索引:
show index from 表名
创建索引 当字段类型不为varchar时, 可以不必填写字符串:
create index 索引名 on 表名(字段名(长度))

删除索引:
drop index 索引名 on 表名
2。使用存储过程,存入
test_1 –>test999999 数据,用作查询的数据

delimiter //create procedure pro_test()begin declare i int default 0;while i<1000000 doinsert into test_url(url) values(concat('test',i));set i=i+1;end while;end //

删除存储过程:
drop procedure 存储过程名

原创粉丝点击