# # Anzahl Sätze in der DB, von Datum, bis Datum, Anzahl Tage # QUERY PLAN -------------------------------------------------------------------------------------------------------------------- Aggregate (cost=28924.49..28924.49 rows=1 width=4) (actual time=3408.51..3408.51 rows=1 loops=1) -> Seq Scan on flows (cost=0.00..19380.88 rows=763488 width=4) (actual time=0.02..1671.79 rows=763488 loops=1) Total runtime: 3409.05 msec (3 Zeilen) # # Tagesstatistik je Protokoll # QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=14419.56..14419.89 rows=131 width=52) (actual time=13472.11..13472.38 rows=159 loops=1) Sort Key: f.date, (sum(f.sdbytes) + sum(f.dsbytes)) -> HashAggregate (cost=14412.99..14414.95 rows=131 width=52) (actual time=13470.92..13471.59 rows=159 loops=1) -> Hash Join (cost=2.62..14375.76 rows=2482 width=52) (actual time=10.58..7998.45 rows=753800 loops=1) Hash Cond: ("outer"."type" = "inner".pnum) -> Index Scan using flows_2 on flows f (cost=0.00..14214.68 rows=3818 width=24) (actual time=0.18..2987.40 rows=753800 loops=1) Index Cond: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) -> Hash (cost=2.30..2.30 rows=130 width=36) (actual time=6.23..6.23 rows=0 loops=1) -> Seq Scan on protos p (cost=0.00..2.30 rows=130 width=36) (actual time=0.09..0.43 rows=130 loops=1) Total runtime: 13478.65 msec (10 Zeilen) # # Tagesstatistik gesamt # QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=14262.45..14262.45 rows=2 width=20) (actual time=5141.80..5141.86 rows=31 loops=1) Sort Key: date, (sum(sdbytes) + sum(dsbytes)) -> GroupAggregate (cost=0.00..14262.44 rows=2 width=20) (actual time=193.42..5141.57 rows=31 loops=1) -> Index Scan using flows_2 on flows f (cost=0.00..14214.68 rows=3818 width=20) (actual time=0.12..2423.80 rows=753800 loops=1) Index Cond: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) Total runtime: 5142.25 msec (6 Zeilen) # # Top 50: max( Bytes ) # QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=14312.30..14312.42 rows=50 width=72) (actual time=8398.72..8398.97 rows=50 loops=1) -> Sort (cost=14312.30..14312.80 rows=201 width=72) (actual time=8398.70..8398.79 rows=50 loops=1) Sort Key: (sum(sdbytes) + sum(dsbytes)) -> HashAggregate (cost=14300.59..14304.61 rows=201 width=72) (actual time=8188.61..8296.36 rows=23410 loops=1) -> Index Scan using flows_2 on flows f (cost=0.00..14252.86 rows=3818 width=72) (actual time=0.15..4768.39 rows=753800 loops=1) Index Cond: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) Total runtime: 8432.66 msec (7 Zeilen)