Re: [pmacct-discussion] Low performance query

2010-04-28 Thread Paolo Lucente
Hi Sergio, The sql_history drives temporal aggregation by splitting traffic data into time-bins. You configured 5 minutes time-bins. See the behaviour of the 'stamp_inserted' field, ie. do SELECT DISTINCT(stamp_inserted) FROM table ORDER BY stamp_inserted, to get this more clear. The roundoff

Re: [pmacct-discussion] Low performance query

2010-04-28 Thread Sergio Charpinel Jr.
Thanks Paolo, Creating index decreased query time from 1min to 5 sec hehe. The searchs are often by ip_src and ip_dst, between 2 dates (stamp_inserted). I think that indexes just for ip_src and ip_dst are fine. Cheers. 2010/4/28 Paolo Lucente pa...@pmacct.net Hi Sergio, The sql_history

[pmacct-discussion] Low performance query

2010-04-27 Thread Sergio Charpinel Jr.
Hi, I'm using pmacct 0.12.1 with PostgreSQL 8.4 and FloX. i'm running pmacctd and nfacctd daemons (probe and collector). After 1 day running, I'm getting 1+min to make a query. Is there any config in pmacct and PostgreSQL that I can do improve this? Here is my config in pmacct: pmacctd.conf:

Re: [pmacct-discussion] Low performance query

2010-04-27 Thread Paolo Lucente
Hi Sergio, I don't know FloX very well - hence would be good information to know which specific SQL queries are performing bad. Maybe there is room to improve indexing. Is it also your goal to store every micro-flow into the SQL database? Any chance a more compact aggregation method would fit

Re: [pmacct-discussion] Low performance query

2010-04-27 Thread Sergio Charpinel Jr.
Hi Paolo, I'm getting low perfomance while selecting from psql and from FloX. For example, selecting * WHERE ip_src = 'x.x.x.x' How can I do a more compact aggregation? You mean by getting samples ? Actually, I did not understand very well sql_history and roundoff concepts, but increasing