Skip to content

Enhancement: performance enhancements for analytics queries #211

@think-in-universe

Description

@think-in-universe

#210 (comment)

2. Performance: unindexed LATERAL join per deployment row

The new list_deployments code adds a lateral subquery that runs a full aggregate over user_usage_event for every deployment row (WHERE instance_id = ai.id). Without an index on user_usage_event.instance_id this will be a full table scan per row and will routinely hit the 30s AGGREGATION_TIMEOUT_MS. Please verify the index exists or add one in a migration.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions