Skip to content

[receiver/postgresql] Additional metric: number of sequential scans. #26096

Closed
@bjandras

Description

@bjandras

Component(s)

receiver/postgresql

Is your feature request related to a problem? Please describe.

A number of sequential scans per database/table would be a very useful metric, as sequential scans can usually be a symptom of unoptimized queries/schema.

Describe the solution you'd like

An existing metric,postgresql.operation, already counts the number of row insertions, deletions, hot updates, etc., per database and table. These numbers are directly obtained from the pg_stat_user_tables internal PostgreSQL view. The seq_scan column of pg_stat_user_tables contains the number of sequential scans.

We can add an additional value to the operation attribute of the postgresql.operation metric -- seq_scan -- and write out an additional "operations" data point with that attribute value.

Describe alternatives you've considered

If we don't want to add new operation attribute types to postgresql.operation metric, we can introduce a completely new metric, e.g. postgresql.sequential_scans.

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions