Complete Observability
for your Database
Immediately actionable optimization for your Database.
Increase your DB performance, reduce response time & lower cost in the next 5 minutes.






SELECT t.amount, t.currency_id, st.amount, st.currency_id, t.method_id, t.type_id, t.id, t.completed_at, p.name as provider_name FROM "payments".transaction t LEFT JOIN "payments".provider p ON t.rovider_id = p.id LEFT JOIN "bank".settled st ON t.id = st.transaction_id
Unserstand the reasoning behind the fix
Get detailed explanations and insights for every optimization, so you can truly understand the overall impact.
>> Key Fixes
CROSS JOIN Instead of INNER JOIN:
Changed to CROSS JOIN for period calculations since we're working with a single-row CTE
Pre-Calculated Days:
Moved all day calculations to the periods CTE to simplify grouping
Proper GROUP BY:
GROUP BY p.days_last_year_to_date, p.days_this_year_to_date, p.days_last_year_after_date, p.days_remaining_this_year
Now only grouping by the pre-calculated day counts that are actually used in the calculations.
>> Why This Works
- The periods CTE now contains all necessary date boundaries and pre-calculated day counts.
- By using CROSS JOIN, we ensure all transactions are evaluated against the single set of period dates.
- The GROUP BY only needs to reference the final calculated day counts rather than raw dates.
>> Pick your plan
Plan Includes
Your Questions, Answered
1. Connect
Securely connect Stixs to your database with just a few clicks.
2. Analyze
Our AI examines your queries, execution plans and data patterns to identify optimization opportunities.
3. Optimize
Review & Implement our optimizations with detailed explanations and speed insights.