Go prepare statment超過mysql最大數

來源:互聯網
上載者:User

標籤:

mysql_stmt_prepare failed! error(1461)Can‘t create more than max_prepared_stmt_count statements (current value: 16382)



給出的回複如下:

max_prepared_stmt_count參數限制了同一時間在mysqld上所有session中prepared 語句的上限。
它的取值範圍為“0 - 1048576”,預設為16382。
mysql對於超出max_prepared_stmt_count的prepare語句就會報1461的錯誤。 調試語句:

mysql> show global status like ‘%stmt%‘;

+----------------------------+--------+

| Variable_name              | Value  |

+----------------------------+--------+

| Binlog_stmt_cache_disk_use | 0      |

| Binlog_stmt_cache_use      | 0      |

| Com_stmt_close             | 142593 |

| Com_stmt_execute           | 170302 |

| Com_stmt_fetch             | 0      |

| Com_stmt_prepare           | 157761 |

| Com_stmt_reprepare         | 0      |

| Com_stmt_reset             | 0      |

| Com_stmt_send_long_data    | 0      |

| Prepared_stmt_count        | 4      |

+----------------------------+--------+

10 rows in set (0.06 sec)

mysql> set global max_prepared_stmt_count=124000;
Query OK, 0 rows affected (0.00 sec)

 

Go prepare statment超過mysql最大數

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.