PostgreSQL versus MySQL for EAV structures storage
-
16-10-2019 - |
Question
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 hstore
extension for storing sets of key/value pairs.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange