explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UuPX

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.005 13,471.701 ↓ 0.0 0 1

Delete on metrics_21 (cost=25.53..872.1 rows=100 width=38) (actual time=13,471.701..13,471.701 rows=0 loops=1)

  • Buffers: shared hit=322 read=1215895
2. 0.019 13,471.696 ↓ 0.0 0 1

Nested Loop (cost=25.53..872.1 rows=100 width=38) (actual time=13,471.696..13,471.696 rows=0 loops=1)

  • Buffers: shared hit=322 read=1215895
3. 0.080 13,471.477 ↑ 1.0 100 1

Aggregate (cost=25.1..26.1 rows=100 width=40) (actual time=13,471.454..13,471.477 rows=100 loops=1)

  • Buffers: shared hit=22 read=1215895
4. 0.077 13,471.397 ↑ 1.0 100 1

Subquery Scan on ANY_subquery (cost=0..24.85 rows=100 width=40) (actual time=13,460.528..13,471.397 rows=100 loops=1)

  • Buffers: shared hit=22 read=1215895
5. 0.025 13,471.320 ↑ 1.0 100 1

Limit (cost=0..23.85 rows=100 width=8) (actual time=13,460.5..13,471.32 rows=100 loops=1)

  • Buffers: shared hit=22 read=1215895
6. 0.031 13,471.295 ↑ 184,856.2 100 1

Append (cost=0..4,408,596.95 rows=18,485,622 width=8) (actual time=13,460.498..13,471.295 rows=100 loops=1)

  • Buffers: shared hit=22 read=1215895
7. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on metrics metrics (cost=0..0 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (metrics."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
8. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on metrics_00 metrics_00 (cost=0..11.38 rows=37 width=8) (actual time=0..0 rows=0 loops=1)

  • Filter: (metrics_00."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
9. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on metrics_01 metrics_01 (cost=0..11.38 rows=37 width=8) (actual time=0..0 rows=0 loops=1)

  • Filter: (metrics_01."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
10. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on metrics_02 metrics_02 (cost=0..11.38 rows=37 width=8) (actual time=0..0 rows=0 loops=1)

  • Filter: (metrics_02."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
11. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on metrics_03 metrics_03 (cost=0..11.38 rows=37 width=8) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: (metrics_03."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
12. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on metrics_04 metrics_04 (cost=0..11.38 rows=37 width=8) (actual time=0..0 rows=0 loops=1)

  • Filter: (metrics_04."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
13. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on metrics_05 metrics_05 (cost=0..11.38 rows=37 width=8) (actual time=0..0 rows=0 loops=1)

  • Filter: (metrics_05."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
14. 0.011 0.011 ↓ 0.0 0 1

Index Scan using index_metrics_06_on_ts_and_capture_interval_name on metrics_06 metrics_06 (cost=0.39..281.02 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (metrics_06."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=3
15. 0.004 0.004 ↓ 0.0 0 1

Index Scan using index_metrics_07_on_ts_and_capture_interval_name on metrics_07 metrics_07 (cost=0.39..2,286.23 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (metrics_07."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=3
16. 0.002 0.002 ↓ 0.0 0 1

Index Scan using index_metrics_08_on_ts_and_capture_interval_name on metrics_08 metrics_08 (cost=0.12..8.14 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (metrics_08."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=1
17. 0.004 0.004 ↓ 0.0 0 1

Index Scan using index_metrics_09_on_ts_and_capture_interval_name on metrics_09 metrics_09 (cost=0.4..222.58 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (metrics_09."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=3
18. 0.005 0.019 ↓ 0.0 0 1

Bitmap Heap Scan on metrics_10 metrics_10 (cost=1,808.68..6,977.71 rows=1,566 width=8) (actual time=0.019..0.019 rows=0 loops=1)

  • Buffers: shared hit=4
19. 0.014 0.014 ↓ 0.0 0 1

Bitmap Index Scan on index_metrics_10_on_ts_and_capture_interval_name (cost=0..1,808.29 rows=1,566 width=0) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (metrics_10."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=4
20. 2,738.208 2,738.208 ↓ 0.0 0 1

Seq Scan on metrics_11 metrics_11 (cost=0..245,446.61 rows=487,284 width=8) (actual time=2,738.208..2,738.208 rows=0 loops=1)

  • Filter: (metrics_11."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared read=227094
21. 0.018 0.018 ↓ 0.0 0 1

Index Scan using index_metrics_12_on_ts_and_capture_interval_name on metrics_12 metrics_12 (cost=0.55..284.03 rows=66 width=8) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (metrics_12."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=4
22. 5,160.936 5,160.936 ↓ 0.0 0 1

Seq Scan on metrics_13 metrics_13 (cost=0..486,237.14 rows=1,823,609 width=8) (actual time=5,160.936..5,160.936 rows=0 loops=1)

  • Filter: (metrics_13."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared read=463441
23. 1,079.792 1,079.792 ↓ 0.0 0 1

Seq Scan on metrics_14 metrics_14 (cost=0..103,778.5 rows=271,425 width=8) (actual time=1,079.792..1,079.792 rows=0 loops=1)

  • Filter: (metrics_14."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared read=100368
24. 4,396.432 4,396.432 ↓ 0.0 0 1

Seq Scan on metrics_15 metrics_15 (cost=0..435,378.46 rows=1,451,402 width=8) (actual time=4,396.432..4,396.432 rows=0 loops=1)

  • Filter: (metrics_15."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared read=416837
25. 84.966 84.966 ↓ 0.0 0 1

Seq Scan on metrics_16 metrics_16 (cost=0..25,891.25 rows=1,411,022 width=8) (actual time=84.966..84.966 rows=0 loops=1)

  • Filter: (metrics_16."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared read=8144
26. 0.005 0.023 ↓ 0.0 0 1

Bitmap Heap Scan on metrics_17 metrics_17 (cost=15,380.68..205,479.54 rows=87,291 width=8) (actual time=0.023..0.023 rows=0 loops=1)

  • Buffers: shared hit=1
27. 0.018 0.018 ↓ 0.0 0 1

Bitmap Index Scan on index_metrics_17_on_ts_and_capture_interval_name (cost=0..15,358.86 rows=87,291 width=0) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (metrics_17."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=1
28. 10.847 10.847 ↑ 16,085.3 100 1

Seq Scan on metrics_18 metrics_18 (cost=0..421,031.66 rows=1,608,526 width=8) (actual time=0.067..10.847 rows=100 loops=1)

  • Filter: (metrics_18."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
  • Buffers: shared hit=3 read=11
29. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on metrics_19 metrics_19 (cost=0..493,598.59 rows=2,990,170 width=8) (never executed)

  • Filter: (metrics_19."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
30. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on metrics_20 metrics_20 (cost=0..492,859.35 rows=2,080,476 width=8) (never executed)

  • Filter: (metrics_20."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
31. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on metrics_21 metrics_21_1 (cost=0..496,204.62 rows=2,088,911 width=8) (never executed)

  • Filter: (metrics_21_1."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
32. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on metrics_22 metrics_22 (cost=0..496,263.41 rows=2,103,562 width=8) (never executed)

  • Filter: (metrics_22."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
33. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on metrics_23 metrics_23 (cost=0..496,299.85 rows=2,080,085 width=8) (never executed)

  • Filter: (metrics_23."timestamp" <= '2018-02-01 19:56:37.519979'::timestamp without time zone)
34. 0.200 0.200 ↓ 0.0 0 100

Index Scan using metrics_21_pkey on metrics_21 metrics_21 (cost=0.43..8.45 rows=1 width=14) (actual time=0.002..0.002 rows=0 loops=100)

  • Index Cond: (metrics_21.id = "ANY_subquery".id)
  • Buffers: shared hit=300
Planning time : 227.956 ms
Execution time : 13,472.351 ms