Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic PostgreSQL indexes #201

Open
Konard opened this issue Sep 1, 2024 · 0 comments
Open

Dynamic PostgreSQL indexes #201

Konard opened this issue Sep 1, 2024 · 0 comments

Comments

@Konard
Copy link
Member

Konard commented Sep 1, 2024

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant