-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Nest.jsStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programbackendNew feature or requestNew feature or request
Description
π Overview
As GasGuard analytics and dashboards grow, query performance can degrade, causing slow response times for merchants and developers. Proper indexing improves query efficiency, reduces latency, and ensures a responsive experience.
This task introduces Database Index Optimization to accelerate analytics queries and improve dashboard performance.
π― Objective
Build a system that:
- Identifies slow queries and performance bottlenecks in analytics and reporting
- Implements optimal database indexes on frequently queried tables and columns
- Ensures faster response times for dashboards and API analytics endpoints
- Maintains data integrity while optimizing performance
π Scope of Work
1οΈβ£ Query Analysis
-
Profile database queries used for dashboards and reporting:
- Gas usage aggregation per merchant
- Transaction success metrics
- Chain reliability and gas volatility metrics
-
Identify:
- Columns frequently used in
WHERE,JOIN, andORDER BYclauses - Tables with large datasets or high read frequency
- Opportunities for composite or partial indexes
- Columns frequently used in
2οΈβ£ Index Implementation
-
Create optimized indexes in the database (PostgreSQL recommended):
- Single-column indexes for high-selectivity queries
- Composite indexes for multi-column filtering
- Partial indexes for subset data (e.g., recent transactions)
-
Ensure minimal write performance impact
Example SQL:
CREATE INDEX idx_merchant_chain_date
ON transactions (merchant_id, chain_id, created_at);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Nest.jsStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programbackendNew feature or requestNew feature or request