explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C2r6

Settings
# exclusive inclusive rows x rows loops node
1. 2,907.921 6,306.147 ↑ 1.0 1 1

Aggregate (cost=56,637.72..56,637.73 rows=1 width=32) (actual time=6,306.132..6,306.147 rows=1 loops=1)

  • Buffers: shared hit=180,821
2. 0.005 3,206.125 ↑ 1.0 1 1

Nested Loop Left Join (cost=56,636.66..56,637.70 rows=1 width=32) (actual time=3,206.105..3,206.125 rows=1 loops=1)

  • Buffers: shared hit=180,821
3. 0.018 0.018 ↑ 1.0 1 1

Seq Scan on vendor (cost=0.00..1.01 rows=1 width=4) (actual time=0.014..0.018 rows=1 loops=1)

  • Filter: (id = 1)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=1
4. 362.719 3,206.102 ↑ 1.0 1 1

Aggregate (cost=56,636.66..56,636.67 rows=1 width=32) (actual time=3,206.089..3,206.102 rows=1 loops=1)

  • Buffers: shared hit=180,820
5. 8.479 2,830.701 ↓ 13.0 12,682 1

Nested Loop Left Join (cost=57.85..56,622.03 rows=975 width=64) (actual time=0.488..2,830.701 rows=12,682 loops=1)

  • Buffers: shared hit=180,820
6. 8.053 184.366 ↓ 13.0 12,682 1

Nested Loop Left Join (cost=7.84..7,827.12 rows=975 width=44) (actual time=0.138..184.366 rows=12,682 loops=1)

  • Buffers: shared hit=35,494
7. 3.837 11.447 ↓ 13.0 12,682 1

Unique (cost=0.28..421.99 rows=975 width=12) (actual time=0.056..11.447 rows=12,682 loops=1)

  • Buffers: shared hit=1,351
8. 1.469 7.610 ↓ 1.3 12,682 1

Custom Scan (ChunkAppend) on instance_cost (cost=0.28..397.61 rows=9,752 width=12) (actual time=0.053..7.610 rows=12,682 loops=1)

  • Order: instance_cost.end_time
  • Chunks excluded during runtime: 0
  • Buffers: shared hit=1,351
9. 3.424 3.424 ↑ 1.0 6,790 1

Index Scan Backward using _hyper_51_113_chunk_instance_cost_end_time_idx on _hyper_51_113_chunk (cost=0.28..281.82 rows=6,792 width=12) (actual time=0.027..3.424 rows=6,790 loops=1)

  • Index Cond: (end_time >= '2020-10-03 04:47:15'::timestamp without time zone)
  • Filter: (vendor.id = vendor_id)
  • Buffers: shared hit=172
10. 2.717 2.717 ↓ 2.0 5,892 1

Index Only Scan Backward using _hyper_51_111_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_111_chunk (cost=0.28..115.79 rows=2,960 width=12) (actual time=0.013..2.717 rows=5,892 loops=1)

  • Index Cond: ((vendor_id = vendor.id) AND (end_time >= '2020-10-03 04:47:15'::timestamp without time zone))
  • Heap Fetches: 1,946
  • Buffers: shared hit=1,179
11. 25.364 164.866 ↑ 1.0 1 12,682

Aggregate (cost=7.55..7.56 rows=1 width=32) (actual time=0.013..0.013 rows=1 loops=12,682)

  • Buffers: shared hit=34,143
12. 114.138 139.502 ↑ 3.0 1 12,682

Custom Scan (ChunkAppend) on instance_cost instance_cost_1 (cost=0.28..7.51 rows=3 width=8) (actual time=0.010..0.011 rows=1 loops=12,682)

  • Chunks excluded during runtime: 2
  • Buffers: shared hit=34,143
13. 11.784 11.784 ↑ 1.0 1 5,892

Index Only Scan using _hyper_51_111_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_111_chunk _hyper_51_111_chunk_1 (cost=0.28..2.50 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=5,892)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Heap Fetches: 1,946
  • Buffers: shared hit=13,731
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using _hyper_51_112_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_112_chunk (cost=0.28..2.50 rows=1 width=8) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Heap Fetches: 0
15. 13.580 13.580 ↑ 1.0 1 6,790

Index Only Scan using _hyper_51_113_chunk_instance_cost_vendor_id_end_time_idx on _hyper_51_113_chunk _hyper_51_113_chunk_1 (cost=0.28..2.50 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Heap Fetches: 6,790
  • Buffers: shared hit=20,370
16.          

SubPlan (for Aggregate)

17. 0.000 0.000 ↑ 1.0 1 12,682

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=12,682)

18. 2,206.668 2,637.856 ↑ 1.0 1 12,682

Aggregate (cost=50.02..50.03 rows=1 width=32) (actual time=0.208..0.208 rows=1 loops=12,682)

  • Buffers: shared hit=145,326
19. 191.128 431.188 ↑ 2.5 22 12,682

Custom Scan (ChunkAppend) on pod_cost (cost=0.15..49.17 rows=56 width=220) (actual time=0.018..0.034 rows=22 loops=12,682)

  • Chunks excluded during runtime: 4
  • Buffers: shared hit=145,326
20. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_5_3_chunk_pod_cost_pod_id_end_time_idx on _hyper_5_3_chunk (cost=0.15..4.46 rows=1 width=220) (never executed)

  • Index Cond: (end_time = instance_cost.end_time)
  • Filter: (instance_cost.vendor_id = vendor_id)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_5_16_chunk_pod_cost_pod_id_end_time_idx on _hyper_5_16_chunk (cost=0.15..4.46 rows=1 width=220) (never executed)

  • Index Cond: (end_time = instance_cost.end_time)
  • Filter: (instance_cost.vendor_id = vendor_id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using _hyper_5_20_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_20_chunk (cost=0.42..13.23 rows=21 width=220) (never executed)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
23. 122.220 122.220 ↑ 1.0 22 6,790

Index Scan using _hyper_5_38_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_38_chunk (cost=0.42..15.95 rows=22 width=220) (actual time=0.004..0.018 rows=22 loops=6,790)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Buffers: shared hit=69,097
24. 117.840 117.840 ↓ 2.0 22 5,892

Index Scan using _hyper_5_73_chunk_pod_cost_vendor_id_end_time_idx on _hyper_5_73_chunk (cost=0.42..11.07 rows=11 width=220) (actual time=0.005..0.020 rows=22 loops=5,892)

  • Index Cond: ((vendor_id = instance_cost.vendor_id) AND (end_time = instance_cost.end_time))
  • Buffers: shared hit=76,229
25.          

SubPlan (for Aggregate)

26. 0.000 0.000 ↑ 1.0 1 278,966

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=278,966)

27.          

SubPlan (for Aggregate)

28. 12.682 12.682 ↑ 1.0 1 12,682

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=12,682)

29.          

SubPlan (for Aggregate)

30. 192.101 192.101 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=182.853..192.101 rows=1 loops=1)

Planning time : 5.872 ms
Execution time : 6,379.338 ms