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

Support various index types in index Macros #6

Open
jordan8037310 opened this issue Sep 12, 2020 · 4 comments
Open

Support various index types in index Macros #6

jordan8037310 opened this issue Sep 12, 2020 · 4 comments

Comments

@jordan8037310
Copy link

Opening a ticket as I might work on this:

  • PgSQL supports a range of index types: B-tree, Hash, GiST, SP-GiST, GIN and BRIN
  • It might be worthwhile to expand the macro to include a type variable with the default being B-Tree / unset. A case statement could implement one of the index types inside of the macro based on the type.

My use case is applying a GIN index on some JSON data I'm storing, which I believe will speed up some of my dbt transformations downstream.

@sgoley
Copy link
Owner

sgoley commented Sep 14, 2020

@jordan8037310 all for it.
Was just exposed to the trigram index type myself late last week so I would have my own contributions to make sure that option is covered.

More info:
https://www.postgresql.org/docs/9.6/pgtrgm.html

@sgoley
Copy link
Owner

sgoley commented Feb 19, 2021

@jordan8037310 finally got this into the develop branch! see: #10

Sorry for the delay, had been pretty busy the last couple months but trying to find some time to starting working on this again.

@jordan8037310
Copy link
Author

Great! I myself haven't been spending much time in our Pg dbt project either, but that could change shortly

@sgoley
Copy link
Owner

sgoley commented Feb 24, 2021

@jordan8037310 sounds great! Do you have examples of the json that I could use for testing and how you apply the GIN index? I can work that into my testing since I'm not too familiar with it.

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

2 participants