explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3XXa

Settings
# exclusive inclusive rows x rows loops node
1. 0.076 0.401 ↑ 7.4 53 1

Hash Left Join (cost=10.63..3,745.51 rows=392 width=119) (actual time=0.131..0.401 rows=53 loops=1)

  • Hash Cond: (d.device_id = sdm.device_id)
2. 0.023 0.133 ↑ 7.4 53 1

Hash Left Join (cost=7.53..40.81 rows=392 width=63) (actual time=0.088..0.133 rows=53 loops=1)

  • Hash Cond: (d.device_id = mpm.device_id)
3. 0.052 0.097 ↑ 7.8 50 1

Hash Right Join (cost=6.12..36.04 rows=392 width=54) (actual time=0.066..0.097 rows=50 loops=1)

  • Hash Cond: (jd.child_device_id = d.device_id)
4. 0.003 0.003 ↑ 196.2 8 1

Seq Scan on joined_device jd (cost=0.00..25.70 rows=1,570 width=16) (actual time=0.002..0.003 rows=8 loops=1)

5. 0.016 0.042 ↑ 1.0 50 1

Hash (cost=5.50..5.50 rows=50 width=46) (actual time=0.042..0.042 rows=50 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
6. 0.026 0.026 ↑ 1.0 50 1

Seq Scan on device d (cost=0.00..5.50 rows=50 width=46) (actual time=0.010..0.026 rows=50 loops=1)

7. 0.009 0.013 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=17) (actual time=0.013..0.013 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.004 0.004 ↑ 1.0 18 1

Seq Scan on meter_point_mapping mpm (cost=0.00..1.18 rows=18 width=17) (actual time=0.002..0.004 rows=18 loops=1)

9. 0.009 0.018 ↑ 1.0 49 1

Hash (cost=2.49..2.49 rows=49 width=32) (actual time=0.018..0.018 rows=49 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
10. 0.009 0.009 ↑ 1.0 49 1

Seq Scan on secure_device_map sdm (cost=0.00..2.49 rows=49 width=32) (actual time=0.003..0.009 rows=49 loops=1)

11.          

SubPlan (for Hash Left Join)

12. 0.000 0.056 ↑ 1.0 1 8

Limit (cost=2.88..4.10 rows=1 width=9) (actual time=0.007..0.007 rows=1 loops=8)

13.          

Initplan (for Limit)

14. 0.008 0.040 ↑ 1.0 1 8

Limit (cost=0.00..2.88 rows=1 width=8) (actual time=0.004..0.005 rows=1 loops=8)

15. 0.032 0.032 ↑ 2.0 1 8

Seq Scan on device (cost=0.00..5.75 rows=2 width=8) (actual time=0.004..0.004 rows=1 loops=8)

  • Filter: ((sms_id = d.sms_id) AND ((device_type)::text = 'ESME'::text))
  • Rows Removed by Filter: 24
16. 0.048 0.048 ↑ 1.0 1 8

Seq Scan on meter_point_mapping (cost=0.00..1.23 rows=1 width=9) (actual time=0.006..0.006 rows=1 loops=8)

  • Filter: (device_id = $1)
  • Rows Removed by Filter: 3
17. 0.000 0.040 ↑ 1.0 1 4

Limit (cost=2.88..4.10 rows=1 width=9) (actual time=0.010..0.010 rows=1 loops=4)

18.          

Initplan (for Limit)

19. 0.004 0.016 ↑ 1.0 1 4

Limit (cost=0.00..2.88 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=4)

20. 0.012 0.012 ↑ 2.0 1 4

Seq Scan on device device_1 (cost=0.00..5.75 rows=2 width=8) (actual time=0.003..0.003 rows=1 loops=4)

  • Filter: ((sms_id = d.sms_id) AND ((device_type)::text = 'GSME'::text))
  • Rows Removed by Filter: 18
21. 0.036 0.036 ↑ 1.0 1 4

Seq Scan on meter_point_mapping meter_point_mapping_1 (cost=0.00..1.23 rows=1 width=9) (actual time=0.009..0.009 rows=1 loops=4)

  • Filter: (device_id = $3)
  • Rows Removed by Filter: 4
22. 0.000 0.078 ↓ 0.0 0 39

Limit (cost=0.00..1.23 rows=1 width=9) (actual time=0.002..0.002 rows=0 loops=39)

23. 0.078 0.078 ↓ 0.0 0 39

Seq Scan on meter_point_mapping meter_point_mapping_2 (cost=0.00..1.23 rows=1 width=9) (actual time=0.002..0.002 rows=0 loops=39)

  • Filter: (device_id = d.device_id)
  • Rows Removed by Filter: 13
Planning time : 0.554 ms
Execution time : 0.499 ms