MySQL, Query, Optimization, Web Performance, Database.
resources 6, if you use a temporary table, be sure to delete all temporary tables at the end of the stored procedure, first truncate table, then drop table, this can avoid long-term locking of the system table 7, try to avoid using cursors, because the cursor is less efficient, if the data of the