explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R4En

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 122.438 ↑ 1.0 1 1

Aggregate (cost=7,040.08..7,040.09 rows=1 width=0) (actual time=122.438..122.438 rows=1 loops=1)

2. 1.349 122.404 ↑ 3.1 100 1

Merge Join (cost=7,016.18..7,039.31 rows=306 width=0) (actual time=118.988..122.404 rows=100 loops=1)

  • Merge Cond: (all_devices_emon_status_data.nid = node_parents.nid)
3. 8.096 19.597 ↓ 1.9 5,365 1

Sort (cost=887.27..894.26 rows=2,795 width=16) (actual time=17.497..19.597 rows=5,365 loops=1)

  • Sort Key: all_devices_emon_status_data.nid
  • Sort Method: external merge Disk: 136kB
4. 2.132 11.501 ↓ 1.9 5,390 1

Subquery Scan on all_devices_emon_status_data (cost=5.38..678.28 rows=2,795 width=16) (actual time=0.139..11.501 rows=5,390 loops=1)

5. 1.942 9.369 ↓ 1.9 5,390 1

Append (cost=5.38..650.33 rows=2,795 width=153) (actual time=0.138..9.369 rows=5,390 loops=1)

6. 0.105 0.575 ↑ 1.0 150 1

Subquery Scan on *SELECT* 1 (cost=5.38..29.44 rows=150 width=2,329) (actual time=0.137..0.575 rows=150 loops=1)

7. 0.245 0.470 ↑ 1.0 150 1

Hash Join (cost=5.38..27.94 rows=150 width=2,329) (actual time=0.136..0.470 rows=150 loops=1)

  • Hash Cond: (w.endpoint_id = f.endpoint_id)
8. 0.118 0.118 ↑ 1.0 150 1

Seq Scan on emon_status_wide_data w (cost=0.00..20.50 rows=150 width=2,297) (actual time=0.004..0.118 rows=150 loops=1)

9. 0.061 0.107 ↑ 1.0 150 1

Hash (cost=3.50..3.50 rows=150 width=36) (actual time=0.107..0.107 rows=150 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.046 0.046 ↑ 1.0 150 1

Seq Scan on emon_frequent_data f (cost=0.00..3.50 rows=150 width=36) (actual time=0.007..0.046 rows=150 loops=1)

11. 6.626 6.852 ↓ 2.0 5,240 1

Seq Scan on device (cost=28.31..594.44 rows=2,645 width=30) (actual time=0.311..6.852 rows=5,240 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 150
12.          

SubPlan (forSeq Scan)

13. 0.107 0.226 ↑ 1.0 150 1

Hash Join (cost=5.38..27.94 rows=150 width=16) (actual time=0.097..0.226 rows=150 loops=1)

  • Hash Cond: (w.endpoint_id = f.endpoint_id)
14. 0.034 0.034 ↑ 1.0 150 1

Seq Scan on emon_status_wide_data w (cost=0.00..20.50 rows=150 width=20) (actual time=0.000..0.034 rows=150 loops=1)

15. 0.043 0.085 ↑ 1.0 150 1

Hash (cost=3.50..3.50 rows=150 width=4) (actual time=0.085..0.085 rows=150 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
16. 0.042 0.042 ↑ 1.0 150 1

Seq Scan on emon_frequent_data f (cost=0.00..3.50 rows=150 width=4) (actual time=0.003..0.042 rows=150 loops=1)

17. 0.087 101.458 ↑ 12.2 100 1

Sort (cost=6,128.91..6,131.96 rows=1,220 width=16) (actual time=101.437..101.458 rows=100 loops=1)

  • Sort Key: node_parents.nid
  • Sort Method: quicksort Memory: 20kB
18. 101.371 101.371 ↑ 12.2 100 1

Seq Scan on node_parents (cost=0.00..6,066.36 rows=1,220 width=16) (actual time=101.312..101.371 rows=100 loops=1)

  • Filter: ((parent_nid)::text = '6589a325-de9e-44b1-84ee-0b2023093d13'::text)
  • Rows Removed by Filter: 243364