Information Schema Examples

suggest change

Processlist

This will show all active & sleeping queries in that order then by how long.

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

This is a bit more detail on time-frames as it is in seconds by default

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 Procedure Searching

Easily search thru all Stored Procedures for words and wildcards.

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents