Reported by rbrewer, Jul 14, 2010
Sometimes a client wants to find the maximum or minimum value from a range of SensorData. Currently, this is expensive, as the client would have to retrieve all SensorData in the range and then compare each one. Clearly, this can be done more quickly on the server side.
This would involve creating two new API resources "max" and "min" which take a property parameter of "powerGenerated" or "powerConsumed". Note that right now only those two power properties are supported, since the energy counters are monotonically increasing it doesn't make sense to query them for a max or min.
Apr 3, 2012 AndreaMConnell
The new database schema will make this task much easier since powerGenerated and powerConsumed are now columns in the SensorData table. Ex:
Select min(powerGenerated) from SensorData where Source=?
Reported by rbrewer, Jul 14, 2010 Sometimes a client wants to find the maximum or minimum value from a range of SensorData. Currently, this is expensive, as the client would have to retrieve all SensorData in the range and then compare each one. Clearly, this can be done more quickly on the server side.
This would involve creating two new API resources "max" and "min" which take a property parameter of "powerGenerated" or "powerConsumed". Note that right now only those two power properties are supported, since the energy counters are monotonically increasing it doesn't make sense to query them for a max or min.
Apr 3, 2012 AndreaMConnell The new database schema will make this task much easier since powerGenerated and powerConsumed are now columns in the SensorData table. Ex: Select min(powerGenerated) from SensorData where Source=?