explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8hrF

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.902 58.999 ↑ 1.1 2,288 1

Nested Loop Anti Join (cost=223.90..38,700.66 rows=2,612 width=103) (actual time=1.630..58.999 rows=2,288 loops=1)

  • Join Filter: (tagdeviceshistory.tdh_nl_personnel_id = nlm.nl_id)
  • Rows Removed by Join Filter: 9,157
2. 0.200 56.097 ↑ 1.1 2,291 1

Nested Loop Left Join (cost=223.90..38,526.60 rows=2,613 width=65) (actual time=1.602..56.097 rows=2,291 loops=1)

3. 1.761 5.495 ↑ 1.1 2,291 1

Hash Join (cost=223.61..460.27 rows=2,613 width=36) (actual time=1.569..5.495 rows=2,291 loops=1)

  • Hash Cond: (entities.e_id = nlm.nl_e_id)
4. 2.190 2.190 ↑ 1.0 8,426 1

Seq Scan on entities (cost=0.00..178.93 rows=8,426 width=7) (actual time=0.013..2.190 rows=8,426 loops=1)

  • Filter: (e_et_code = ANY ('{VMTR,TAG,PSD}'::text[]))
  • Rows Removed by Filter: 878
5. 0.545 1.544 ↑ 1.0 2,885 1

Hash (cost=187.55..187.55 rows=2,885 width=37) (actual time=1.543..1.544 rows=2,885 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 180kB
6. 0.999 0.999 ↑ 1.0 2,885 1

Index Scan using nl_index_isactive on nodeslogical nlm (cost=0.28..187.55 rows=2,885 width=37) (actual time=0.012..0.999 rows=2,885 loops=1)

7. 2.291 50.402 ↓ 0.0 0 2,291

Limit (cost=0.29..14.55 rows=1 width=29) (actual time=0.022..0.022 rows=0 loops=2,291)

8. 0.000 48.111 ↓ 0.0 0 2,291

Nested Loop (cost=0.29..14.55 rows=1 width=29) (actual time=0.021..0.021 rows=0 loops=2,291)

9. 4.554 48.111 ↓ 0.0 0 2,291

Nested Loop (cost=0.29..13.07 rows=1 width=29) (actual time=0.021..0.021 rows=0 loops=2,291)

10. 43.529 43.529 ↓ 0.0 0 2,291

Seq Scan on tagdeviceshistory tagdeviceshistory_1 (cost=0.00..4.76 rows=1 width=4) (actual time=0.019..0.019 rows=0 loops=2,291)

  • Filter: ((tdh_date_end IS NULL) AND (tdh_nl_lamp_id = nlm.nl_id))
  • Rows Removed by Filter: 221
11. 0.028 0.028 ↑ 1.0 1 4

Index Scan using nodeslogical_pkey on nodeslogical nlr (cost=0.29..8.30 rows=1 width=37) (actual time=0.007..0.007 rows=1 loops=4)

  • Index Cond: (nl_id = tagdeviceshistory_1.tdh_nl_personnel_id)
  • Filter: (nl_isactive = 1)
  • Rows Removed by Filter: 0
12. 0.012 0.012 ↑ 1.0 1 3

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

  • Filter: (((sa_key)::text = 'enableRFID'::text) AND ((sa_value)::text = '1'::text))
  • Rows Removed by Filter: 4
13. 0.000 0.000 ↑ 1.0 4 2,291

Materialize (cost=0.00..4.23 rows=4 width=4) (actual time=0.000..0.000 rows=4 loops=2,291)

14. 0.022 0.022 ↑ 1.0 4 1

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

  • Filter: (tdh_date_end IS NULL)
  • Rows Removed by Filter: 217