Comment on Rapid schema development with PostgreSQLparentComments−simonw12yWhen reading data back, it's more efficient to query a single table than to have to join against an extra attributes tableSee https://news.ycombinator.com/item?id=6574269 for anecdotal evidence.−moron4hire12ythere are so many variables in that anecdote that there is nothing that can be gleaned from it.−Herbert212yAlright, these were approximately the fields that were Postgre-fied.CREATE TABLE event ( "references" text[], (was 2 tables, references and reference_on_event) "entities" text[], (ditto) "actors" text[], (ditto) "targets" text[], (ditto) "payload" json, (EAV) )Gin index on all the text arrays. There are about 150k events saved per day and PostgreSQL is running on the same kinds of hardware as SQL Server was. The application is quite read heavy.
Comments
When reading data back, it's more efficient to query a single table than to have to join against an extra attributes table
See https://news.ycombinator.com/item?id=6574269 for anecdotal evidence.
there are so many variables in that anecdote that there is nothing that can be gleaned from it.
Alright, these were approximately the fields that were Postgre-fied.
CREATE TABLE event ( "references" text[], (was 2 tables, references and reference_on_event) "entities" text[], (ditto) "actors" text[], (ditto) "targets" text[], (ditto) "payload" json, (EAV) )
Gin index on all the text arrays. There are about 150k events saved per day and PostgreSQL is running on the same kinds of hardware as SQL Server was. The application is quite read heavy.