diff --git "a/data/3.MySQL\351\253\230\351\230\266/1.\346\267\261\345\205\245\347\264\242\345\274\225/4.\347\273\204\345\220\210\347\264\242\345\274\225/combinate.md" "b/data/3.MySQL\351\253\230\351\230\266/1.\346\267\261\345\205\245\347\264\242\345\274\225/4.\347\273\204\345\220\210\347\264\242\345\274\225/combinate.md" index 82d1b5aa5c7c5084cffdcd549b9ea8240e4df0b4..7b2d5d816af480b39ff4a0cdc2b5132f17350826 100644 --- "a/data/3.MySQL\351\253\230\351\230\266/1.\346\267\261\345\205\245\347\264\242\345\274\225/4.\347\273\204\345\220\210\347\264\242\345\274\225/combinate.md" +++ "b/data/3.MySQL\351\253\230\351\230\266/1.\346\267\261\345\205\245\347\264\242\345\274\225/4.\347\273\204\345\220\210\347\264\242\345\274\225/combinate.md" @@ -27,7 +27,7 @@ Joe 应该如何优化? ## 答案 ```sql -alter table goods add index (`stock-id`, category_id, name); +alter table goods add index (stock, category_id, name); ``` ## 选项 @@ -35,7 +35,7 @@ alter table goods add index (`stock-id`, category_id, name); ### A ```sql -alter table goods add index (`stock-id` and category_id and name); +alter table goods add index (stock and category_id and name); ``` ### B @@ -47,5 +47,5 @@ alter table goods add index (concat(stock, category_id, name)); ### C ```sql -alter table goods add index (`stock-id` + category_id + name); +alter table goods add index (stock + category_id + name); ```