-
Notifications
You must be signed in to change notification settings - Fork 94
Use jsonb data type for PostgreSQL to increase perfomance
#82
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
Use jsonb data type for PostgreSQL to increase perfomance
#82
Conversation
jsonb data type for PostgresSQL to increase perfomancejsonb data type for PostgreSQL to increase perfomance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fairly sure you can just do $table->jsonb('name') without all those conditions.
On DBs that don't support jsonb, it'll fall back to json or text.
Postgres uses jsonb as expected:
MySQL goes to json:
SQLite goes to text:
|
|
Yes, you are right. I removed them now. Thanks for the hint! |
To improve perfomance for Postgres databases, the
jsoncolumns can use thejsonbdata type.This is will reduce responsetimes drastically when dealing with large datasets.