Today at work, encountered a particularly slow SQL execution, and then to trace the cause, we found two tables associated with the field, but did not indexed, so he took the table is associated add an index, but forget to add the command index I had to go to Baidu search, after recording just put them up!
- See index
show index from order_book_info_tab;
- Add Index
ALTER TABLE `book_upload_task_t` ADD INDEX idx_bookTaskId ( `bookTaskId` )
- Delete Index
alter table order_book_info_tab drop index idx_processTaskId ;
Reproduced in: https: //www.cnblogs.com/whattaman/p/11052644.html