explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tuew

Settings
# exclusive inclusive rows x rows loops node
1. 1.923 45.295 ↑ 682.8 4 1

GroupAggregate (cost=21,872.37..21,940.64 rows=2,731 width=64) (actual time=42.606..45.295 rows=4 loops=1)

  • Group Key: (to_char((k.stats_time + '01:00:00'::interval), 'YYYY-MM-DD'::text))
2. 2.997 43.372 ↑ 1.3 2,108 1

Sort (cost=21,872.37..21,879.20 rows=2,731 width=37) (actual time=42.034..43.372 rows=2,108 loops=1)

  • Sort Key: (to_char((k.stats_time + '01:00:00'::interval), 'YYYY-MM-DD'::text))
  • Sort Method: quicksort Memory: 234kB
3. 4.712 40.375 ↑ 1.3 2,108 1

Result (cost=0.00..21,716.49 rows=2,731 width=37) (actual time=8.269..40.375 rows=2,108 loops=1)

4. 2.448 35.663 ↑ 1.3 2,108 1

Append (cost=0.00..21,675.53 rows=2,731 width=13) (actual time=8.143..35.663 rows=2,108 loops=1)

5. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on kinetic_stats k (cost=0.00..0.00 rows=1 width=40) (actual time=0.004..0.005 rows=0 loops=1)

  • Filter: (((granularity)::text = 'HOUR'::text) AND ((identifier_class)::text = 'SERVICE'::text) AND (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval))) OR ((
6. 0.003 0.053 ↓ 0.0 0 1

Bitmap Heap Scan on kinetic_stats_2016_p k_1 (cost=9.76..11.85 rows=1 width=11) (actual time=0.053..0.053 rows=0 loops=1)

  • Recheck Cond: (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '73:
  • Filter: (((identifier_class)::text = 'SERVICE'::text) AND (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '
7. 0.002 0.050 ↓ 0.0 0 1

BitmapOr (cost=9.76..9.76 rows=1 width=0) (actual time=0.050..0.050 rows=0 loops=1)

8. 0.030 0.030 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2016_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.44 rows=1 width=0) (actual time=0.030..0.030 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
9. 0.007 0.007 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2016_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.44 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
10. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2016_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.44 rows=1 width=0) (actual time=0.005..0.006 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
11. 0.005 0.005 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2016_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.44 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
12. 0.003 0.037 ↓ 0.0 0 1

Bitmap Heap Scan on kinetic_stats_2017_p k_2 (cost=9.79..11.88 rows=1 width=12) (actual time=0.037..0.037 rows=0 loops=1)

  • Recheck Cond: (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '73:
  • Filter: (((identifier_class)::text = 'SERVICE'::text) AND (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '
13. 0.002 0.034 ↓ 0.0 0 1

BitmapOr (cost=9.79..9.79 rows=1 width=0) (actual time=0.034..0.034 rows=0 loops=1)

14. 0.012 0.012 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2017_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
15. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2017_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
16. 0.008 0.008 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2017_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
17. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2017_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
18. 0.003 0.034 ↓ 0.0 0 1

Bitmap Heap Scan on kinetic_stats_2018_p k_3 (cost=9.81..11.90 rows=1 width=12) (actual time=0.034..0.034 rows=0 loops=1)

  • Recheck Cond: (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)))
  • Filter: (((identifier_class)::text = 'SERVICE'::text) AND (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)))))
19. 0.001 0.031 ↓ 0.0 0 1

BitmapOr (cost=9.81..9.81 rows=1 width=0) (actual time=0.031..0.031 rows=0 loops=1)

20. 0.012 0.012 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2018_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
21. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2018_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.005..0.006 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
22. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2018_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.005..0.006 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
23. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on kinetic_stats_2018_p_stats_time_granularity_identifier_id_idx (cost=0.00..2.45 rows=1 width=0) (actual time=0.005..0.006 rows=0 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
24. 25.728 33.086 ↑ 1.3 2,108 1

Bitmap Heap Scan on kinetic_stats_current k_4 (cost=324.71..21,626.26 rows=2,727 width=13) (actual time=8.011..33.086 rows=2,108 loops=1)

  • Recheck Cond: (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)) OR ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text)))
  • Filter: (((identifier_class)::text = 'SERVICE'::text) AND (((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval))) OR ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)))))
  • Rows Removed by Filter: 6713
  • Heap Blocks: exact=3813
25. 0.007 7.358 ↓ 0.0 0 1

BitmapOr (cost=324.71..324.71 rows=10,520 width=0) (actual time=7.357..7.358 rows=0 loops=1)

26. 1.684 1.684 ↑ 1.2 2,129 1

Bitmap Index Scan on kinetic_stats_2019_p_stats_time_granularity_identifier_id_idx (cost=0.00..80.50 rows=2,630 width=0) (actual time=1.684..1.684 rows=2,129 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '97:00:00'::interval)) AND (stats_time <= (now() - '97:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
27. 1.575 1.575 ↑ 1.2 2,154 1

Bitmap Index Scan on kinetic_stats_2019_p_stats_time_granularity_identifier_id_idx (cost=0.00..80.50 rows=2,630 width=0) (actual time=1.574..1.575 rows=2,154 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '73:00:00'::interval)) AND (stats_time <= (now() - '73:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
28. 1.941 1.941 ↑ 1.2 2,146 1

Bitmap Index Scan on kinetic_stats_2019_p_stats_time_granularity_identifier_id_idx (cost=0.00..80.50 rows=2,630 width=0) (actual time=1.941..1.941 rows=2,146 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '49:00:00'::interval)) AND (stats_time <= (now() - '49:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))
29. 2.151 2.151 ↑ 1.1 2,392 1

Bitmap Index Scan on kinetic_stats_2019_p_stats_time_granularity_identifier_id_idx (cost=0.00..80.50 rows=2,630 width=0) (actual time=2.151..2.151 rows=2,392 loops=1)

  • Index Cond: ((stats_time >= (('now'::cstring)::date - '25:00:00'::interval)) AND (stats_time <= (now() - '25:00:01'::interval)) AND ((granularity)::text = 'HOUR'::text))