Skip to content

Dynamic PostgreSQL indexes #201

@konard

Description

@konard
  1. Create all indexes for all columns in the table: https://gist.github.com/Konard/8d2866bcc55192aa24c887b40553419d
  2. Collect indexes usage statistics
  3. Collect statistics about executed queries
  4. Translate statistics from 2 and 3 steps into sequences of columns that are used and their usage frequency (Read access frequency metric konard/LinksPlatform#589 can be related)
  5. Once in the moment of time, use N most frequent sequences of columns as combined indexes, all other combined indexes that are not in whitelist are deleted.

This way we get dynamic adaptation of indexes to queries and indexes usage statistics.

There should be setting that is updatable by user for changing the number of indexes used versus write speed and storage space used.

This way the user will be able to adjust what is more important to have good write speed or to have good read speed.


Forked from deep-foundation/deeplinks#28 by https://github.com/konard/gh-org-migrator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions