文件首頁
MySQL 9.0 參考手冊
相關文件 下載本手冊
PDF (美式信紙) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 258.2Kb
Man Pages (Zip) - 365.3Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 參考手冊  /  ...  /  ps_thread_stack() 函數

30.4.5.16 ps_thread_stack() 函數

傳回指定執行緒 ID 在 Performance Schema 內的 JSON 格式化陳述式、階段和事件堆疊。

參數
  • in_thread_id BIGINT:要追蹤的執行緒 ID。此值應與某些 Performance Schema 的 threads 表格列的 THREAD_ID 欄位值相符。

  • in_verbose BOOLEAN:是否在事件中包含 file:lineno 資訊。

傳回值

一個 LONGTEXT CHARACTER SET latin1 值。

範例
mysql> SELECT sys.ps_thread_stack(37, FALSE) AS thread_stack\G
*************************** 1. row ***************************
thread_stack: {"rankdir": "LR","nodesep": "0.10",
"stack_created": "2014-02-19 13:39:03", "mysql_version": "8.4.0-tr",
"mysql_user": "root@localhost","events": [{"nesting_event_id": "0",
"event_id": "10", "timer_wait": 256.35, "event_info": "sql/select",
"wait_info": "select @@version_comment limit 1\nerrors: 0\nwarnings: 0\nlock time:
...