資訊模式示例

PROCESSLIST

這將按順序顯示所有活動和休眠查詢,然後顯示多長時間。

SELECT * FROM information_schema.PROCESSLIST ORDER BY INFO DESC, TIME DESC;

這是關於時間幀的更多細節,因為它預設為秒

SELECT ID, USER, HOST, DB, COMMAND, 
TIME as time_seconds, 
ROUND(TIME / 60, 2) as time_minutes, 
ROUND(TIME / 60 / 60, 2) as time_hours, 
STATE, INFO
FROM information_schema.PROCESSLIST ORDER BY INFO DESC, TIME DESC;

儲存過程搜尋

通過所有 Stored Procedures 輕鬆搜尋單詞和萬用字元。

SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%word%';