explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tBAn

Settings
# exclusive inclusive rows x rows loops node
1. 0.801 293.236 ↓ 1.3 1,846 1

Nested Loop Left Join (cost=2,193.11..3,136,359.34 rows=1,424 width=103) (actual time=0.126..293.236 rows=1,846 loops=1)

2.          

Initplan (for Nested Loop Left Join)

3. 0.011 0.011 ↑ 1.0 1 1

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

  • Filter: (((sa_key)::text = 'enableRFID'::text) AND ((sa_value)::text = '1'::text))
  • Rows Removed by Filter: 4
4. 0.731 290.578 ↓ 1.3 1,846 1

Merge Anti Join (cost=2,191.36..3,117,696.36 rows=1,424 width=36) (actual time=0.121..290.578 rows=1,846 loops=1)

  • Merge Cond: (nlm.nl_id = tagdeviceshistory.tdh_nl_personnel_id)
5. 0.771 289.814 ↓ 1.3 1,846 1

Nested Loop (cost=2,187.11..3,117,688.51 rows=1,425 width=36) (actual time=0.088..289.814 rows=1,846 loops=1)

6. 3.401 14.123 ↓ 1.6 2,291 1

Nested Loop (cost=0.57..1,841.21 rows=1,425 width=36) (actual time=0.048..14.123 rows=2,291 loops=1)

7. 4.952 4.952 ↑ 1.0 2,885 1

Index Scan using nodeslogical_pkey on nodeslogical nlm (cost=0.29..638.08 rows=2,885 width=37) (actual time=0.021..4.952 rows=2,885 loops=1)

  • Filter: (nl_isactive = 1)
  • Rows Removed by Filter: 6,136
8. 5.770 5.770 ↑ 1.0 1 2,885

Index Scan using entities_pkey on entities (cost=0.29..0.42 rows=1 width=7) (actual time=0.002..0.002 rows=1 loops=2,885)

  • Index Cond: (e_id = nlm.nl_e_id)
  • Filter: ((e_et_code = ANY ('{VMTR,PSD}'::text[])) OR ((e_et_code = 'TAG'::text) AND $0))
  • Rows Removed by Filter: 0
9. 2.291 274.920 ↑ 1.0 1 2,291

Limit (cost=2,186.54..2,186.54 rows=1 width=8) (actual time=0.119..0.120 rows=1 loops=2,291)

10. 109.968 272.629 ↑ 806.0 1 2,291

Sort (cost=2,186.54..2,188.55 rows=806 width=8) (actual time=0.119..0.119 rows=1 loops=2,291)

  • Sort Key: trackingmessagesindexed.tmi_disconnect DESC
  • Sort Method: top-N heapsort Memory: 25kB
11. 126.005 162.661 ↑ 2.9 276 2,291

Bitmap Heap Scan on trackingmessagesindexed (cost=18.67..2,182.51 rows=806 width=8) (actual time=0.020..0.071 rows=276 loops=2,291)

  • Recheck Cond: (tmi_nl_mobile_id = nlm.nl_id)
  • Heap Blocks: exact=18,715
12. 36.656 36.656 ↑ 2.9 276 2,291

Bitmap Index Scan on tmi_indextrackingmobile (cost=0.00..18.47 rows=806 width=0) (actual time=0.016..0.016 rows=276 loops=2,291)

  • Index Cond: (tmi_nl_mobile_id = nlm.nl_id)
13. 0.005 0.033 ↑ 1.0 4 1

Sort (cost=4.25..4.26 rows=4 width=4) (actual time=0.031..0.033 rows=4 loops=1)

  • Sort Key: tagdeviceshistory.tdh_nl_personnel_id
  • Sort Method: quicksort Memory: 25kB
14. 0.028 0.028 ↑ 1.0 4 1

Seq Scan on tagdeviceshistory (cost=0.00..4.21 rows=4 width=4) (actual time=0.015..0.028 rows=4 loops=1)

  • Filter: (tdh_date_end IS NULL)
  • Rows Removed by Filter: 217
15. 1.846 1.846 ↓ 0.0 0 1,846

Limit (cost=0.29..13.08 rows=1 width=29) (actual time=0.001..0.001 rows=0 loops=1,846)

16. 0.000 0.000 ↓ 0.0 0 1,846

Result (cost=0.29..13.08 rows=1 width=29) (actual time=0.000..0.000 rows=0 loops=1,846)

  • One-Time Filter: (entities.e_et_code = 'TAG'::text)
17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.29..13.08 rows=1 width=29) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Seq Scan on tagdeviceshistory tagdeviceshistory_1 (cost=0.00..4.76 rows=1 width=4) (never executed)

  • Filter: ((tdh_date_end IS NULL) AND (tdh_nl_lamp_id = nlm.nl_id))
19. 0.000 0.000 ↓ 0.0 0

Index Scan using nodeslogical_pkey on nodeslogical nlr (cost=0.29..8.30 rows=1 width=33) (never executed)

  • Index Cond: (nl_id = tagdeviceshistory_1.tdh_nl_personnel_id)
  • Filter: (nl_isactive = 1)