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
[Epic] extendedIndexes
GA
#12376
Comments
really appreciate this work prisma team! I've been having trouble getting prisma to not create migrations dropping a GIN index i tried adding manually to the db, so this feature would really help! |
Can you quickyl create a separate issue about what you are seeing @sourdzl? Currently GIN and GiST is not part of |
sure @janpio ! We have a JSONB column in postgres which is shallow (just string key/value pairs, no nesting.). We'd like to index the keys which will be used commonly for WHERE and JOIN filtering, and it seems a GIN index solves this perfectly. We're happy with any solution that allows the GIN indices to exist - so far we keep having prisma generate migrations that drop the GIN index. specifying a thank you all for maintaining such a great project! |
@sourdzl I did some digging what we should be doing here. It's not final proposal, which I'm doing this week so we can write the code. Can you see if it misses something that you'd want to see in the feature? https://github.com/pimeys/writing/blob/main/prisma/PostgreSQL%20Index%20Types.md I'm trying to cover Gin, GiST, SP-GiST and BRIN indices, and the default built-in operators. The tsvector stuff for full-text queries will be coming later this year. |
Internal proposals:
|
Discovery what is the issue with index lengths on MySQL and what we could do here: https://github.com/pimeys/writing/blob/main/prisma/Discovery:%20MySQL%20Index%20Length%20Limitations.md |
@pimeys thanks for writing such a detailed proposal. It definitely meets our immediate need (GIN index on JSONB column type, so we can do fast checks of top level key presence). I suspect the GIN/GIST support will be broadly useful for other postgres users. Farther down the line, we'd like to try some of the full text searching features as well, but also realize postgres is not the best choice for search overall. For us, GIN/GIST indexing are "must have" feature. (sorry for the delayed response) |
GIN/GIST/SP-GiST/BRIN work going on here: prisma/prisma-engines#2858 |
And that is merged, you can use Let us know how it goes please! |
We are GA. |
The feature currently encompasses the
sort
andlength
arguments as well as thetype
argument on Postgres.It was released in 3.5 and 3.6 (
type
).Main docs here: https://www.prisma.io/docs/concepts/components/prisma-schema/indexes
Preview feature feedback can be found here. #10540
Stabilizing this is a BREAKING CHANGE.
Feature Work
Bugs
Documentation
Reference
Use cases
Polishing
TEXT
orBLOB
in MySQL @id/@index/@unique #10292Error parsing attribute "@id"
but it's actually about@@id
#10566@
and@@
in validation errors prisma-engines#2893Stabilizing
extendedIndexes
#12777Issues to close after GA
Out of scope for GA
@@index
and@map
information ingetDMMF
#3998length
property is MySQL configuration specific (innodb_page_size
), could lead to broken migrations #10990The text was updated successfully, but these errors were encountered: