Hi, Jamie,

You can use the group-by clause to get the output into the format you 
want.  Say each data record has a column named month and a column 
denoting the number of bytes transferred called bytes, you can get the 
traffic volume (assumed to be total number of bytes transferred here) 
by a query of the following form

ibis -d data-dir -q "select month, sum(bytes) where 
your-selection-criteria group by month"

In factor, if you use actually use ibis.cpp to answer this query, the 
group by clause can actually be skipped if the order of group by 
operation is the same as the order of the columns in the select 
clause.  Internally, ibis.cpp detects that you have requested an 
aggregation operation in the select clause and by default will perform 
group by on all column names that are not in an aggregation function.

The same select clause can be passed to ibis::query object or 
ibis::table::select function as well.

John


On 3/16/2011 8:22 AM, Jaime Nebrera wrote:
>     Hi all list members,
>
>     We are developing a web frontend for nprobe acting as a collector
> with fastbit backend. We know how to do this with mysql and such, but
> would like to do it with fastbit for speed and volume.
>
>     Wat we are trying to get is something like this (sorry, some asci art):
>
> Traffic volume
>      |
>      |
>      |     *
>      |     *
>      |     *   *       *           *       *
>      |     *   *       *   *       *       *
>      |     *   *   *   *   *       *       *           *
>     ------------------------------------------------------
>           Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec  (time)
>
>     Well, you get the idea. The same could be applied in a single day if
> you divide it in hour frames (24) or 5 min frames (24*12) to make things
> even more scary.
>
>     How should I query fastbit to get each point in the graph (say 12 for
> the yearly graph) without having to do this operation 12 times? (yes,
> each one is quite fast, but when you start to compound them they add a
> lot). Imagine a day graph with 5 minute interval frames, that would mean
> 12*24 queries for a single graph (actually for a single line within that
> graph, if we add other lines things skyrocket)
>
>     Very thankful in advance. Kind regards
>
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to