Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Upgrade Binary Trees to Generalized Search Trees #28

Open
TheLoneRonin opened this issue Feb 26, 2021 · 0 comments
Open

Upgrade Binary Trees to Generalized Search Trees #28

TheLoneRonin opened this issue Feb 26, 2021 · 0 comments
Labels
backlog Backlogged deliverables enhancement New feature or request

Comments

@TheLoneRonin
Copy link
Contributor

Description

Currently, the codebase uses Binary Trees for indices. This can be optimized by implementing Generalized Search Trees instead. This will help scale tag searches and reduce bloat in the indices as well too.

Solution

There are a couple moving components to the project. We would need to enable GIST by running the SQL command.

CREATE EXTENSION btree_gist;

In development, this is fairly trivial as you can just ssh into Postgres and run the command. However, with docker-compose we would need to have a boot sql script to run this command as an adminstrator.

After, all indices that are VARCHAR should be upgraded to GIST as opposed to HASH or BTREE.

Reference

@TheLoneRonin TheLoneRonin added backlog Backlogged deliverables enhancement New feature or request labels Feb 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog Backlogged deliverables enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant