CREATE INDEX ind ON carts(userId,bookId); //为carts表的两个字段userId和bookId加上索引
SHOW INDEX from carts; //查看carts表的索引
DROP INDEX ind ON carts; //删除carts表上的ind索引
CREATE INDEX ind ON carts(userId,bookId); //为carts表的两个字段userId和bookId加上索引
SHOW INDEX from carts; //查看carts表的索引
DROP INDEX ind ON carts; //删除carts表上的ind索引