Skip to content

Idea: how to catch errors of the "missing index" class #360

Description

@mfvanek

In integration tests, at the very beginning, we set enable_seqscan to off. What will force the scheduler to avoid seq scan, if it has such an opportunity (there is an index)

At the end of the test, we look at the statistics of accesses to the table (for each table, postgres counts the number of seq scans and accesses through indexes). If the number of seq scans is greater than 0, it means that there is not enough index for some SELECT

To check, there is a diagnosis of "Tables with missing indexes"

It's like an alternative https://habr.com/ru/companies/tinkoff/articles/454066/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions