explain.depesz.com

PostgreSQL's explain analyze made readable

Result: v4fi

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.121 ↓ 1.5 3 1

Unique (cost=20.33..20.34 rows=2 width=40) (actual time=0.120..0.121 rows=3 loops=1)

2. 0.018 0.120 ↓ 2.0 4 1

Sort (cost=20.33..20.34 rows=2 width=40) (actual time=0.119..0.120 rows=4 loops=1)

  • Sort Key: d.mobile_device_id
  • Sort Method: quicksort Memory: 25kB
3. 0.001 0.102 ↓ 2.0 4 1

Subquery Scan on d (cost=20.30..20.32 rows=2 width=40) (actual time=0.101..0.102 rows=4 loops=1)

4. 0.005 0.101 ↓ 2.0 4 1

Sort (cost=20.30..20.30 rows=2 width=44) (actual time=0.100..0.101 rows=4 loops=1)

  • Sort Key: (CASE WHEN (u.e_et_code = 'TAG'::text) THEN 1 ELSE NULL::integer END)
  • Sort Method: quicksort Memory: 25kB
5. 0.001 0.096 ↓ 2.0 4 1

Subquery Scan on u (cost=20.24..20.29 rows=2 width=44) (actual time=0.094..0.096 rows=4 loops=1)

6. 0.002 0.095 ↓ 2.0 4 1

Unique (cost=20.24..20.26 rows=2 width=40) (actual time=0.094..0.095 rows=4 loops=1)

7. 0.014 0.093 ↓ 2.0 4 1

Sort (cost=20.24..20.25 rows=2 width=40) (actual time=0.093..0.093 rows=4 loops=1)

  • Sort Key: nodeslogical.nl_id, tagdeviceshistory.tdh_nl_lamp_id, entities.e_et_code
  • Sort Method: quicksort Memory: 25kB
8. 0.000 0.079 ↓ 2.0 4 1

Append (cost=15.77..20.23 rows=2 width=40) (actual time=0.042..0.079 rows=4 loops=1)

9. 0.002 0.058 ↑ 1.0 1 1

Result (cost=15.77..17.99 rows=1 width=14) (actual time=0.042..0.058 rows=1 loops=1)

  • One-Time Filter: $0
10.          

Initplan (for Result)

11. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on serveradmin (cost=0.00..1.36 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=1)

  • Filter: (((sa_key)::text = 'enableRFID'::text) AND ((sa_value)::text = '1'::text))
  • Rows Removed by Filter: 23
12. 0.005 0.048 ↑ 1.0 1 1

Nested Loop (cost=14.41..16.63 rows=1 width=14) (actual time=0.033..0.048 rows=1 loops=1)

13. 0.002 0.009 ↓ 2.0 2 1

Nested Loop (cost=0.00..2.19 rows=1 width=10) (actual time=0.006..0.009 rows=2 loops=1)

  • Join Filter: (nodeslogical.nl_e_id = entities.e_id)
  • Rows Removed by Join Filter: 8
14. 0.003 0.003 ↓ 2.0 2 1

Seq Scan on entities (cost=0.00..1.12 rows=1 width=10) (actual time=0.002..0.003 rows=2 loops=1)

  • Filter: (e_et_code = 'TAG'::text)
  • Rows Removed by Filter: 10
15. 0.004 0.004 ↓ 1.7 5 2

Seq Scan on nodeslogical (cost=0.00..1.03 rows=3 width=8) (actual time=0.001..0.002 rows=5 loops=2)

16. 0.010 0.034 ↓ 0.0 0 2

Limit (cost=14.41..14.41 rows=1 width=8) (actual time=0.016..0.017 rows=0 loops=2)

17. 0.010 0.024 ↓ 0.0 0 2

Sort (cost=14.41..14.43 rows=8 width=8) (actual time=0.012..0.012 rows=0 loops=2)

  • Sort Key: tagdeviceshistory.tdh_date_start DESC
  • Sort Method: quicksort Memory: 25kB
18. 0.004 0.014 ↓ 0.0 0 2

Bitmap Heap Scan on tagdeviceshistory (cost=4.21..14.37 rows=8 width=8) (actual time=0.007..0.007 rows=0 loops=2)

  • Recheck Cond: (tdh_nl_personnel_id = nodeslogical.nl_id)
  • Heap Blocks: exact=1
19. 0.010 0.010 ↓ 0.0 0 2

Bitmap Index Scan on tagdeviceshistory_pkey (cost=0.00..4.21 rows=8 width=0) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (tdh_nl_personnel_id = nodeslogical.nl_id)
20. 0.011 0.021 ↓ 3.0 3 1

Hash Join (cost=1.07..2.21 rows=1 width=14) (actual time=0.019..0.021 rows=3 loops=1)

  • Hash Cond: (entities_1.e_id = nodeslogical_1.nl_e_id)
21. 0.004 0.004 ↑ 1.0 3 1

Seq Scan on entities entities_1 (cost=0.00..1.12 rows=3 width=10) (actual time=0.003..0.004 rows=3 loops=1)

  • Filter: (e_et_code = ANY ('{PSD,VMTR}'::text[]))
  • Rows Removed by Filter: 9
22. 0.004 0.006 ↓ 1.7 5 1

Hash (cost=1.03..1.03 rows=3 width=8) (actual time=0.005..0.006 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
23. 0.002 0.002 ↓ 1.7 5 1

Seq Scan on nodeslogical nodeslogical_1 (cost=0.00..1.03 rows=3 width=8) (actual time=0.001..0.002 rows=5 loops=1)