3 ms·
What do you use JSONB columns for? The only use case that comes immediately to mind is stuff like settings or config blobs for individual entities
by babelfish 5y ago
What do you use JSONB columns for? The only use case that comes immediately to mind is stuff like settings or config blobs for individual entities
- derefr 5y agoPostgres jsonb + redis_fdw = you can JOIN your structured Postgres data against your unstructured app-layer Redis data. Not a good idea to write any code that does this—just move the Redis data into the DB, for crying out loud—but for BI use-cases where you’re writing one-off SQL queries and you need presentation-layer data that lives in Redis, it’s perfect.
- e1g 5y agoI run a multi-tenant SaaS where every tenant can define custom properties on every entity. PG allows us to dump everything into a single jsonb column, and still have superb performance for filtering / analytics / searching etc. The backend codebase remains mostly agnostic to the data shape, and we rarely have to change the database during new releases.