# # Anzahl Sätze in der DB, von Datum, bis Datum, Anzahl Tage # QUERY PLAN -------------------------------------------------------------------------------------------------------------------- Aggregate (cost=41037.49..41037.50 rows=1 width=4) (actual time=6226.68..6226.69 rows=1 loops=1) -> Seq Scan on flows (cost=0.00..31493.88 rows=763488 width=4) (actual time=0.02..3071.08 rows=763488 loops=1) Total runtime: 6227.08 msec (3 rows) # # Tagesstatistik je Protokoll # QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=175003.67..175013.77 rows=4038 width=28) (actual time=30314.13..30314.68 rows=159 loops=1) Sort Key: f.date, (sum(f.sdbytes) + sum(f.dsbytes)) -> GroupAggregate (cost=161732.39..174761.81 rows=4038 width=28) (actual time=23452.70..30313.26 rows=159 loops=1) -> Sort (cost=161732.39..163585.08 rows=741077 width=28) (actual time=23452.30..26414.32 rows=753800 loops=1) Sort Key: f.date, p.pname -> Hash Join (cost=2.62..46430.11 rows=741077 width=28) (actual time=1.31..11960.64 rows=753800 loops=1) Hash Cond: ("outer"."type" = "inner".pnum) -> Seq Scan on flows f (cost=0.00..35311.32 rows=741077 width=24) (actual time=0.07..3909.10 rows=753800 loops=1) Filter: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) -> Hash (cost=2.30..2.30 rows=130 width=12) (actual time=1.13..1.13 rows=0 loops=1) -> Seq Scan on protos p (cost=0.00..2.30 rows=130 width=12) (actual time=0.05..0.58 rows=130 loops=1) Total runtime: 30319.64 msec (12 rows) # # Tagesstatistik gesamt # QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Sort (cost=44576.06..44576.14 rows=32 width=20) (actual time=7703.97..7704.07 rows=31 loops=1) Sort Key: date, (sum(sdbytes) + sum(dsbytes)) -> HashAggregate (cost=44574.78..44575.26 rows=32 width=20) (actual time=7703.55..7703.72 rows=31 loops=1) -> Seq Scan on flows f (cost=0.00..35311.32 rows=741077 width=20) (actual time=0.07..3450.81 rows=753800 loops=1) Filter: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) Total runtime: 7704.81 msec (6 rows) # # Top 50: max( Bytes ) # QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=306484.35..306484.47 rows=50 width=30) (actual time=39336.01..39336.64 rows=50 loops=1) -> Sort (cost=306484.35..308337.04 rows=741077 width=30) (actual time=39336.00..39336.18 rows=50 loops=1) Sort Key: (sum(sdbytes) + sum(dsbytes)) -> GroupAggregate (cost=161634.37..187572.07 rows=741077 width=30) (actual time=30577.11..39023.60 rows=23410 loops=1) -> Sort (cost=161634.37..163487.06 rows=741077 width=30) (actual time=30576.95..34875.71 rows=753800 loops=1) Sort Key: network(set_masklen(sip, 16)), network(set_masklen(dip, 16)) -> Seq Scan on flows f (cost=0.00..42722.09 rows=741077 width=30) (actual time=0.12..6544.05 rows=753800 loops=1) Filter: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) Total runtime: 39399.83 msec (9 rows)