Can MySql nested SP be a bottleneck?

后端 未结 2 1977
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-23 02:16

We have this MySQL SP, which calls a nested SP. It seems it does NOT perform well under load.

It is possible that this SP becomes slow under load because it calls a nes

2条回答
  •  甜味超标
    2021-01-23 02:34

    It seems nested SPs was NOT the main bottleneck.

    I've changed temp tables to MEMORY engine and it really did the trick and made AMAZING difference. Solution was suggested in

    https://dba.stackexchange.com/questions/52825/can-mysql-nested-sp-be-a-bottleneck/52863?noredirect=1#52863

    create temporary table areas (
        id int not null,
        code varchar(30),
        name varchar(100),
        shortName varchar(100),
        levelid int not null,
        sortOrder int not null,
        key (id)
    ) ENGINE=MEMORY;
    

提交回复
热议问题