Open ryansb opened 9 years ago
I will rerun the tests with JSON and make an update on the blog post. But adding an index to the structure field would a misleading optimization. All request except the aggregation already goes to indexed fields. The aggregation is defined as an ad hoc query.
That's fair, feel free to skip the indexing. Even without the index, JSONB should make a performance difference. Thank you for considering the change, and thanks for publishing these benchmarks. :smile:
In the tests you use the JSON type, while for a "real" environment that was performance-sensitive it's likely that JSONB would be used instead. Optionally, you could also add a GIN on the
structure
field which would likely improve the relation matching performance.