[rrd-users] Re: Strategies for data storage and graphing
Anthony DeRobertis
anthony at derobert.net
Tue Jan 10 18:34:15 MET 2006
On Tue, Jan 10, 2006 at 05:32:29PM +0200, Kenneth Kalmer wrote:
> The reporting system is coded in PHP, and there are a good couple of
> PHP classes that generate all kinds of statistical graphs, charts,
> etc.. The one I've found the best so far is a library called jpGraph.
> But it chokes on creating a graph with so much data and the memory
> consumption in PHP is tremendous when doing this. This triggered my
> investigations into an alternative, hence rrd.
The data aggregation that rrdtool does is not magic, and there is no
reason you couldn't do it in MySQL. For example:
SELECT
UNIX_TIMESTAMP(stamp) DIV 60 AS minute, AVG(val) AS val
FROM data WHERE
stamp >= '2005-01-01' AND stamp < '2006-01-01'
GROUP BY minute
ORDER BY minute --- query is untested, needs mysql 4.1 for DIV
Now, given, this query will probably take a while, but MySQL will likely
be far better at handling the large amount of data than PHP. And, if
they ever get around to implementing indexed views, this would even be
fast.
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list