|
|
|
|
|
by agentgt
3574 days ago
|
|
One of the tricks I have found for Postgres to manage analytics and unstructured data is using its inheritance with check constraints aka partitioning features. I mention it because not many people seem to know about this bad ass feature of postgres. We use inheritance (with check constraints) [1] for both time partitioning as well as for custom (aka unstructured) events. Most events have several (100s in our case) common columns. When you see a new custom event with custom fields you want to separate out you can create a subtable and have it inherit from the base event table. Now querying for those custom events is extremely fast and you can query from the base event type or the subtable directly. [1]: https://www.postgresql.org/docs/current/static/ddl-partition... |
|