# # 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.29..3408.29 rows=1 loops=1) -> Seq Scan on flows (cost=0.00..19380.88 rows=763488 width=4) (actual time=0.02..1671.06 rows=763488 loops=1) Total runtime: 3408.83 msec (3 Zeilen) # # Tagesstatistik je Protokoll # QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- Sort (cost=46007.38..46017.59 rows=4087 width=28) (actual time=11906.64..11906.91 rows=159 loops=1) Sort Key: f.date, (sum(f.sdbytes) + sum(f.dsbytes)) -> HashAggregate (cost=45700.92..45762.22 rows=4087 width=28) (actual time=11905.42..11906.11 rows=159 loops=1) -> Hash Join (cost=2.62..34450.93 rows=749999 width=28) (actual time=16.34..6845.94 rows=753800 loops=1) Hash Cond: ("outer"."type" = "inner".pnum) -> Seq Scan on flows f (cost=0.00..23198.32 rows=749999 width=24) (actual time=0.10..2255.99 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=9.49..9.49 rows=0 loops=1) -> Seq Scan on protos p (cost=0.00..2.30 rows=130 width=12) (actual time=0.11..0.45 rows=130 loops=1) Total runtime: 11916.51 msec (10 Zeilen) # # Tagesstatistik gesamt # QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Sort (cost=32574.59..32574.67 rows=32 width=20) (actual time=4781.48..4781.53 rows=31 loops=1) Sort Key: date, (sum(sdbytes) + sum(dsbytes)) -> HashAggregate (cost=32573.31..32573.79 rows=32 width=20) (actual time=4781.19..4781.30 rows=31 loops=1) -> Seq Scan on flows f (cost=0.00..23198.32 rows=749999 width=20) (actual time=0.07..2009.61 rows=753800 loops=1) Filter: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) Total runtime: 4782.13 msec (6 Zeilen) # # Top 50: max( Bytes ) # QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------------- Limit (cost=128260.16..128260.29 rows=50 width=30) (actual time=7451.21..7451.46 rows=50 loops=1) -> Sort (cost=128260.16..130135.16 rows=749999 width=30) (actual time=7451.20..7451.28 rows=50 loops=1) Sort Key: (sum(sdbytes) + sum(dsbytes)) -> HashAggregate (cost=40073.30..55073.28 rows=749999 width=30) (actual time=7231.99..7350.32 rows=23410 loops=1) -> Seq Scan on flows f (cost=0.00..30698.31 rows=749999 width=30) (actual time=0.14..3984.49 rows=753800 loops=1) Filter: ((date >= '2003-07-01'::date) AND (date <= '2003-08-01'::date)) Total runtime: 7523.39 msec (7 Zeilen)