Database Tools
Overview
Available Tools
1. get_database_shape - Database Structure Inspector
get_database_shape - Database Structure Inspector{
"include_counts": true, // Include row counts (default: true)
"include_sizes": true, // Include disk sizes (default: true)
"include_indexes": true, // Include index info (default: true)
"include_columns": false // Include column details (default: false)
}2. get_database_stats - Performance & Usage Statistics
get_database_stats - Performance & Usage StatisticsCache Statistics
Table Access Patterns
Index Usage
Unused Indexes
3. analyze_query - Query Performance Analysis
analyze_query - Query Performance AnalysisCommon Use Cases
1. Database Health Check
2. Performance Optimization
3. Growth Monitoring
4. Index Optimization
Performance Metrics Interpretation
Cache Hit Ratio
Ratio
Status
Action
Sequential vs Index Scans
Scenario
Interpretation
Action
Dead Rows
Dead Rows
Action
Best Practices
1. Regular Health Checks
2. Performance Tuning Workflow
3. Index Management
4. Maintenance Schedule
Example Workflow: Finding and Fixing Performance Issues
Step 1: Check Overall Health
Step 2: Identify Problem Tables
Step 3: Check Indexes
Step 4: Review Index Usage
Step 5: Take Action
Test Script
Troubleshooting
"Permission denied" errors
"Function not found" errors
Slow performance
Related Documentation
Summary
Last updated