⚡ Only 300 spots remaining • Closes in 2d 14h 32m
Optimize your database efficiency. This workflow runs every 4 hours. It connects to your MySQL server and queries the information_schema to find threads that have been running longer than 10 seconds. It formats the offending SQL and sends an emergency alert to the engineering Discord channel for immediate triage.
This workflow is pre-configured and ready for deployment. Simply import the JSON template into your n8n instance and configure your credentials.
This is an exclusive blueprint. Copy the JSON below to use it.
PRO TIP
Always test your workflow in a development environment before pushing to production.
{
"nodes": [
{
"parameters": {
"interval": 4,
"unit": "hours"
},
"name": "Every 4h",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [250, 300]
},
{
"parameters": {
"operation": "executeQuery",
"query": "SELECT * FROM information_schema.processlist WHERE time > 10 AND command != 'Sleep';"
},
"name": "Check Slow Queries",
"type": "n8n-nodes-base.mySql",
"typeVersion": 2,
"position": [450, 300]
},
{
"parameters": {
"url": "YOUR_DISCORD_WEBHOOK",
"method": "POST",
"bodyParametersUi": {
"parameter": [
{
"name": "content",
"value": "=⚠️ SLOW QUERY DETECTED\nUser: {{$json[\"USER\"]}}\nTime: {{$json[\"TIME\"]}}s\nSQL: {{$json[\"INFO\"]}}"
}
]
}
},
"name": "Discord Alert",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [650, 300]
}
],
"connections": {
"Every 4h": {
"main": [[{"node": "Check Slow Queries", "type": "main", "index": 0}]]
},
"Check Slow Queries": {
"main": [[{"node": "Discord Alert", "type": "main", "index": 0}]]
}
}
}To use this, copy the JSON above and paste it directly onto your n8n canvas.
Join the elite marketers who have offloaded their entire backend to n8n. Get direct support and custom builds in our private forum.