patternsqlModerate
PostgreSQL versus MySQL for EAV structures storage
Viewed 0 times
postgresqleavversusstoragemysqlforstructures
Problem
Is there any practical difference or what are the advantages of using Postgres 9.x versus MySQL 5.x for storing EAV (Entity-Attribute-Value) structures, especially in terms of read performance?
Solution
Both excel at a simple task like this. If you end up having big queries where you search for entities that share many attributes ("relational division"), I would expect PostgreSQL at an advantage for its superior index handling.
In particular, multiple joins can be combined with bitmap index scans - a feature that is not present in MySQL. It has an "index_merge" feature to substitute for that.
For PostgreSQL you may also be interested in the
In particular, multiple joins can be combined with bitmap index scans - a feature that is not present in MySQL. It has an "index_merge" feature to substitute for that.
For PostgreSQL you may also be interested in the
hstore extension for storing sets of key/value pairs.Context
StackExchange Database Administrators Q#14964, answer score: 15
Revisions (0)
No revisions yet.