Skip to content

Performance Issue: Add index for clinic_activity_logs.numeric_value - created-by-agentic #94

@doppleware

Description

@doppleware

Performance Issue

A significant performance degradation has been detected in queries filtering on the numeric_value column of the clinic_activity_logs table.

Current Behavior

  • Query execution time: 2.68 seconds
  • Full table scan required for filtering on numeric_value
  • Typical duration: 667.7 microseconds
  • Current z-score: 11.75 (significant deviation)

Root Cause

The absence of an index on the numeric_value column forces the database to perform full table scans when filtering on this column.

Solution

Added an index on the numeric_value column to optimize query performance:

CREATE INDEX idx_clinic_activity_logs_numeric_value ON clinic_activity_logs(numeric_value);

Impact

  • Reduces query execution time
  • Eliminates full table scans
  • Improves overall application performance

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