MySQL temporary vs memory table in stored procedures

前端 未结 5 1933
难免孤独
难免孤独 2021-02-14 21:05

What\'s is better to use in a stored procedure: a temporary table or a memory table?

The table is used to stored summary data for reports.

Are there any trade o

5条回答
  •  耶瑟儿~
    2021-02-14 22:03

    Why is this restricted to just the two options? You can do:

    CREATE TEMPORARY TABLE t (avg double) ENGINE=MEMORY;
    

    Which works, although I'm not sure how to check if the memory engine is actually being used here.

提交回复
热议问题