[rrd-users] Newby questions

Pablo Sanchez pablo at blueoakdb.com
Tue Oct 30 00:08:21 CET 2012


[ Comments below, in-line ]

On 10/29/2012 06:57 PM, Tobias Oetiker wrote:
> Today Pablo Chacin wrote:
>
>> For example:
>>
>>>     0:UNKN 300:10 600:10 900:10
>>>
>>> consolidated and then mulitplied by the period will produce the
>>> same value as if all entries were 10, and not with one UNKN (given
>>> the cf is 0.5). A SUM function would nicely return 30.
>>>
>
> otoh, why would you want to count UNKNOWN as ZERO ? isn't more
> corect to asume that the values during the time where you have no
> information were the same as in over the rest of the interval ?

Hey Tobi,

I realize RRD is not an ANSI SQL compliant database (*grin*) ... some
confusion might arise that in a database, NULL (unknown) is not
sum()'d:

--8-<---8-<---8-<---8-<---8-<---8-<---8-<--
19:05:23 plugh > insert into tobi values (1);

1 row created.

Elapsed: 00:00:00.00
19:05:31 plugh > insert into tobi values (4);

1 row created.

Elapsed: 00:00:00.01
19:05:36 plugh > insert into tobi values (8);

1 row created.

Elapsed: 00:00:00.00
19:05:38 plugh > insert into tobi values (null);

1 row created.

Elapsed: 00:00:00.00
19:05:44 plugh > commit;

Commit complete.

Elapsed: 00:00:00.10
19:05:46 plugh > select * from tobi;

SOME_COLUMN
-----------
           1
           4
           8


Elapsed: 00:00:00.01
19:05:49 plugh > select sum(some_column) from tobi;

SUM(SOME_COLUMN)
----------------
               13

Elapsed: 00:00:00.00
19:05:58 plugh >
-- 
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph:    819.459.1926         Blog:  http://pablo.blog.blueoakdb.com
Fax:   760.860.5225 (US)



More information about the rrd-users mailing list