Query Insights
The Query Insights section analyzes your database queries to identify performance bottlenecks. See which queries are slow and get a clear picture of where your database is spending time.
Understanding Your Query Performance
Query Insights automatically analyzes your database queries and surfaces the ones dragging down performance. Think of it as a performance dashboard pointing out exactly where your database is working hardest.
You'll see charts showing slow queries, execution patterns, and operation rates. This data helps you understand where your database is spending time and which queries might benefit from optimization.
Focus on queries that run frequently. A query that's slow but runs once a month is less urgent than one that's moderately slow but runs thousands of times a day.
Time Range Filtering
At the top, filter by time period. Choose from preset options like 5 minutes, 1 hour, 24 hours, and 7 days to understand performance over different timeframes.
Troubleshooting a production issue from yesterday? Pull up yesterday's data. Tracking if your app is gradually getting slower? Compare insights from different weeks to spot trends.
Slow Queries
This section shows queries taking longer than expected. Each query is listed with timing information and how many times it's run.
What matters here:
- How long each query took
- How many times it executed
- Total time spent across all executions
A query that's moderately slow but runs thousands of times is usually more important to fix than a query that's very slow but runs once.
Query Duration Distribution
This chart shows how query execution times are distributed. Most queries fast? You'll see a tall spike on the left. Have a few slow outliers? You'll see a tail extending right.
This helps you understand if you have a few problematic queries or if slow performance is widespread across your workload.
Query Patterns and Trends
Query Insights tracks performance over time, showing you if things are stable, improving, or getting worse.
A growing slow query rate means your database is getting slower over time. Either your data is growing (tables are getting bigger), or your query patterns changed. Either way, it's a signal to investigate.
What Query Insights Shows and Doesn't
Shows:
- Which queries are slow
- How often they run
- Total time spent on them
- Performance trends over time
Doesn't show:
- Exact application code that triggered the query
- Business logic problems (a correct query computing wrong data)
- Application-level issues like N+1 query patterns (your app code reveals those)
Use Insights alongside your application code and database logs to understand the full picture.
Next Steps
Once you identify slow queries, you'll want to investigate further and optimize. The next steps depend on your specific database and query patterns.
Need guidance on optimizing a specific query? Check your database's official documentation or reach out to Galaxy support with the query details.
What's Next?
Logs
The Logs section shows every activity happening in your database in real-time. See connections opening and closing, operations being executed, and errors as they happen. This is your window into what your database is actually doing.
Database Settings
Manage your database backups and access the danger zone for permanent operations. Settings handles backup schedules, manual backups, and database deletion.
