To avoid this, you may consider storing data that you may aggregate later on regular fields.įor further commentary about this issue, you can read Heap's blog post When To Avoid JSONB In A PostgreSQL Schema. All of this will be unavailable when the info is entered as JSON fields, and you will suffer a heavy performance penalty especially when aggregating data ( COUNT, AVG, SUM, etc) among tons of JSON fields. The reason behind this last issue is that, for any given column, PostgreSQL saves descriptive statistics such as the number of distinct and most common values, the fraction of NULL entries, and -for ordered types- a histogram of the data distribution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |