Re: Hot to model data in DB (PostgreSQL) for SNMP-like multiple configurations

2019-03-09 Thread Rene Romero Benavides
Try partitioning your table based on your device_id, that will give you a considerable boost for queries which the where clause includes it. for 9.6 (that's the one your using right?) there's pg_partman for that kind of thing, in this case you would partition by ranges, if the id's are sequential i

Re: Hot to model data in DB (PostgreSQL) for SNMP-like multiple configurations

2019-03-08 Thread Alexandru Lazarev
For now I do not see the strong reason, but i inherited this project from other developers, Originally there was MongoDB and structure was more complex, having SNMP like nested tables with OID.Instance1.Instance2.instance3 and in JSON it looked like: { "1.3.6.1.4.1..3.10.2.2.25.4.1.43.1": {

Re: Hot to model data in DB (PostgreSQL) for SNMP-like multiple configurations

2019-03-08 Thread Alban Hertroys
Is there a reason not to use a relational model instead of json(b) here? I think that is in fact considered best practice. On Fri, 8 Mar 2019 at 15:40, Alexandru Lazarev wrote: > I am working on product managing and monitoring Network (NMS-like > products). > > Product manages configuration of n