Skip to content

Performance Optimization: Add index for clinic_activity_logs.numeric_value-created-by-agentic #430

@doppleware

Description

@doppleware

Issue Description

The /query-logs endpoint is experiencing severe performance degradation, with response times increasing from 525.5μs to 4.26s. This is caused by missing index on the numeric_value column in the clinic_activity_logs table.

Current Status

  • Response time: 4.26s (degraded from 525.5μs)
  • Table cache hit rate: 22.8% (below optimal)
  • Index cache hit rate: 88.8% (below optimal)

Solution

A new btree index has been created on the numeric_value column:

CREATE INDEX crystaldba_idx_clinic_activity_logs_numeric_value_1 ON clinic_activity_logs USING btree (numeric_value);

Implementation

Monitoring

  • Performance will be monitored through Digma to ensure the index resolves the issue
  • Buffer cache settings should be reviewed to improve hit rates

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions