explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ODh7

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 53.298 ↑ 1.5 2 1

Sort (cost=3,907.64..3,907.65 rows=3 width=96) (actual time=53.297..53.298 rows=2 loops=1)

  • Sort Key: products.name
  • Sort Method: quicksort Memory: 27kB
  • Buffers: shared hit=1,425
2. 0.028 53.274 ↑ 1.5 2 1

GroupAggregate (cost=1,298.54..3,907.62 rows=3 width=96) (actual time=53.214..53.274 rows=2 loops=1)

  • Group Key: products.product_id
  • Buffers: shared hit=1,425
3. 0.010 53.246 ↑ 1.5 2 1

Nested Loop (cost=1,298.54..3,907.56 rows=3 width=136) (actual time=27.239..53.246 rows=2 loops=1)

  • Buffers: shared hit=1,425
4. 0.019 0.019 ↑ 1.0 3 1

Index Scan using products_pkey on products (cost=0.13..12.18 rows=3 width=48) (actual time=0.012..0.019 rows=3 loops=1)

  • Buffers: shared hit=2
5. 0.018 53.217 ↑ 1.0 1 3

Subquery Scan on p (cost=1,298.41..1,298.45 rows=1 width=88) (actual time=17.738..17.739 rows=1 loops=3)

  • Buffers: shared hit=1,423
6. 0.090 53.199 ↑ 1.0 1 3

GroupAggregate (cost=1,298.41..1,298.44 rows=1 width=176) (actual time=17.733..17.733 rows=1 loops=3)

  • Group Key: p_1.point_id, (ROW(products_1.product_id, products_1.name))
  • Buffers: shared hit=1,423
7. 0.030 53.109 ↑ 1.0 1 3

Sort (cost=1,298.41..1,298.42 rows=1 width=215) (actual time=17.703..17.703 rows=1 loops=3)

  • Sort Key: p_1.point_id, (ROW(products_1.product_id, products_1.name))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=1,423
8. 0.009 53.079 ↑ 1.0 1 3

Nested Loop Left Join (cost=780.80..1,298.40 rows=1 width=215) (actual time=11.845..17.693 rows=1 loops=3)

  • Buffers: shared hit=1,423
9. 0.045 41.952 ↑ 1.0 1 3

Nested Loop Left Join (cost=12.43..529.98 rows=1 width=128) (actual time=8.137..13.984 rows=1 loops=3)

  • Join Filter: (products_1.product_id = p_1.product_id)
  • Buffers: shared hit=601
10. 6.654 41.889 ↑ 1.0 1 3

Hash Right Join (cost=12.43..528.93 rows=1 width=112) (actual time=8.116..13.963 rows=1 loops=3)

  • Hash Cond: (pa.point_id = p_1.point_id)
  • Buffers: shared hit=599
11. 28.853 35.178 ↑ 1.0 13,066 2

Hash Left Join (cost=1.14..483.32 rows=13,066 width=64) (actual time=0.022..17.589 rows=13,066 loops=2)

  • Hash Cond: (pa.app_id = a.app_id)
  • Buffers: shared hit=587
12. 6.312 6.312 ↑ 1.0 13,066 2

Seq Scan on point_apps pa (cost=0.00..423.66 rows=13,066 width=100) (actual time=0.008..3.156 rows=13,066 loops=2)

  • Buffers: shared hit=586
13. 0.005 0.013 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=48) (actual time=0.013..0.013 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
14. 0.008 0.008 ↑ 1.0 6 1

Seq Scan on apps a (cost=0.00..1.06 rows=6 width=48) (actual time=0.005..0.008 rows=6 loops=1)

  • Buffers: shared hit=1
15. 0.009 0.057 ↑ 1.0 1 3

Hash (cost=11.28..11.28 rows=1 width=64) (actual time=0.019..0.019 rows=1 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
  • Buffers: shared hit=12
16. 0.048 0.048 ↑ 1.0 1 3

Index Scan using points_account_id_idx on points p_1 (cost=0.29..11.28 rows=1 width=64) (actual time=0.014..0.016 rows=1 loops=3)

  • Index Cond: (account_id = '904a4c94-ae70-459a-8c96-869b1d48ca32'::uuid)
  • Filter: (product_id = products.product_id)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=12
17. 0.018 0.018 ↑ 1.0 1 2

Seq Scan on products products_1 (cost=0.00..1.04 rows=1 width=48) (actual time=0.009..0.009 rows=1 loops=2)

  • Filter: (product_id = products.product_id)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=2
18. 0.012 11.118 ↑ 1.0 1 2

Subquery Scan on o (cost=768.38..768.41 rows=1 width=87) (actual time=5.558..5.559 rows=1 loops=2)

  • Buffers: shared hit=822
19. 0.054 11.106 ↑ 1.0 1 2

GroupAggregate (cost=768.38..768.40 rows=1 width=223) (actual time=5.553..5.553 rows=1 loops=2)

  • Group Key: o_1.output_id, eq.*
  • Buffers: shared hit=822
20. 0.046 11.052 ↑ 1.0 1 2

Sort (cost=768.38..768.38 rows=1 width=264) (actual time=5.526..5.526 rows=1 loops=2)

  • Sort Key: o_1.output_id, eq.*
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=822
21. 0.008 11.006 ↑ 1.0 1 2

Nested Loop Left Join (cost=375.40..768.37 rows=1 width=264) (actual time=4.379..5.503 rows=1 loops=2)

  • Buffers: shared hit=822
22. 0.014 5.636 ↑ 1.0 1 2

Nested Loop Left Join (cost=0.15..393.06 rows=1 width=159) (actual time=1.695..2.818 rows=1 loops=2)

  • Buffers: shared hit=410
23. 5.606 5.606 ↑ 1.0 1 2

Seq Scan on outputs o_1 (cost=0.00..368.33 rows=1 width=63) (actual time=1.681..2.803 rows=1 loops=2)

  • Filter: (point_id = p_1.point_id)
  • Rows Removed by Filter: 13,065
  • Buffers: shared hit=410
24. 0.002 0.016 ↓ 0.0 0 2

Subquery Scan on eq (cost=0.15..24.73 rows=1 width=112) (actual time=0.008..0.008 rows=0 loops=2)

25. 0.004 0.014 ↓ 0.0 0 2

GroupAggregate (cost=0.15..24.72 rows=1 width=304) (actual time=0.007..0.007 rows=0 loops=2)

  • Group Key: e.eq_id
26. 0.004 0.010 ↓ 0.0 0 2

Nested Loop Left Join (cost=0.15..24.70 rows=1 width=320) (actual time=0.005..0.005 rows=0 loops=2)

  • Join Filter: (ep.eq_id = e.eq_id)
27. 0.006 0.006 ↓ 0.0 0 2

Index Scan using eqs_pkey on eqs e (cost=0.15..8.17 rows=1 width=272) (actual time=0.003..0.003 rows=0 loops=2)

  • Index Cond: (eq_id = o_1.eq_id)
28. 0.000 0.000 ↓ 0.0 0

Seq Scan on eq_peakings ep (cost=0.00..16.50 rows=3 width=64) (never executed)

  • Filter: (eq_id = o_1.eq_id)
29. 0.012 5.362 ↑ 1.0 1 2

Subquery Scan on d (cost=375.26..375.29 rows=1 width=105) (actual time=2.681..2.681 rows=1 loops=2)

  • Buffers: shared hit=412
30. 0.024 5.350 ↑ 1.0 1 2

GroupAggregate (cost=375.26..375.28 rows=1 width=113) (actual time=2.675..2.675 rows=1 loops=2)

  • Group Key: d_1.device_id, od.output_device_id
  • Buffers: shared hit=412
31. 0.040 5.326 ↑ 1.0 1 2

Sort (cost=375.26..375.26 rows=1 width=81) (actual time=2.662..2.663 rows=1 loops=2)

  • Sort Key: d_1.device_id, od.output_device_id
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=412
32. 0.036 5.286 ↑ 1.0 1 2

Nested Loop Left Join (cost=0.29..375.25 rows=1 width=81) (actual time=1.514..2.643 rows=1 loops=2)

  • Join Filter: (d_1.hardware_model = ANY (dm.identifiers))
  • Rows Removed by Join Filter: 18
  • Buffers: shared hit=412
33. 0.016 5.236 ↑ 1.0 1 2

Nested Loop (cost=0.29..373.63 rows=1 width=79) (actual time=1.491..2.618 rows=1 loops=2)

  • Buffers: shared hit=410
34. 5.184 5.184 ↑ 1.0 1 2

Seq Scan on output_devices od (cost=0.00..365.33 rows=1 width=32) (actual time=1.466..2.592 rows=1 loops=2)

  • Filter: (output_id = o_1.output_id)
  • Rows Removed by Filter: 13,065
  • Buffers: shared hit=404
35. 0.036 0.036 ↑ 1.0 1 2

Index Scan using devices_pkey on devices d_1 (cost=0.29..8.30 rows=1 width=63) (actual time=0.018..0.018 rows=1 loops=2)

  • Index Cond: (device_id = od.device_id)
  • Buffers: shared hit=6
36. 0.014 0.014 ↑ 1.0 19 2

Seq Scan on device_models dm (cost=0.00..1.19 rows=19 width=48) (actual time=0.004..0.007 rows=19 loops=2)

  • Buffers: shared hit=2
Planning time : 3.139 ms
Execution time : 53.650 ms