explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qWxw

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=189,902.21..190,043.41 rows=200 width=60) (actual rows= loops=)

  • Group Key: lockkeyinfo.keyholder
  • Functions: 49
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
2. 0.000 0.000 ↓ 0.0

Sort (cost=189,902.21..189,909.14 rows=2,774 width=78) (actual rows= loops=)

  • Sort Key: lockkeyinfo.keyholder
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=62,175.77..189,743.57 rows=2,774 width=78) (actual rows= loops=)

  • Hash Cond: ((opendoorrecord.userid)::text = (lockkeyinfo_1.keyholder)::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=52,158.74..179,719.14 rows=2,821 width=90) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Merge Join (cost=52,158.18..65,968.44 rows=165,837 width=156) (actual rows= loops=)

  • Merge Cond: ((lockkeyinfo.houseid)::text = (houseinfo.houseid)::text)
6. 0.000 0.000 ↓ 0.0

Unique (cost=52,157.77..56,714.23 rows=364,517 width=258) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=52,157.77..53,069.06 rows=364,517 width=258) (actual rows= loops=)

  • Sort Key: lockkeyinfo.houseid, lockkeyinfo.lockid, lockkeyinfo.keyholder, lockkeyinfo.userrole
8. 0.000 0.000 ↓ 0.0

Append (cost=0.00..13,357.97 rows=364,517 width=258) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on lockkeyinfo (cost=0.00..3,512.78 rows=125,503 width=70) (actual rows= loops=)

  • Filter: (userrole <> 255)
10. 0.000 0.000 ↓ 0.0

Seq Scan on keyhistoryinfo (cost=0.00..4,377.44 rows=239,014 width=66) (actual rows= loops=)

  • Filter: (userrole <> 255)
11. 0.000 0.000 ↓ 0.0

Index Scan using houseinfo_pkey on houseinfo (cost=0.42..2,903.37 rows=54,403 width=35) (actual rows= loops=)

  • Filter: ((xzqhdm)::text ~~ '330522%'::text)
12. 0.000 0.000 ↓ 0.0

Index Scan using opendoorrecord_userid_lockid_idx on opendoorrecord (cost=0.56..0.68 rows=1 width=51) (actual rows= loops=)

  • Index Cond: (((userid)::text = (lockkeyinfo.keyholder)::text) AND ((lockid)::text = (lockkeyinfo.lockid)::text))
13. 0.000 0.000 ↓ 0.0

Hash (cost=9,286.19..9,286.19 rows=58,467 width=12) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

HashAggregate (cost=8,116.85..8,701.52 rows=58,467 width=12) (actual rows= loops=)

  • Group Key: lockkeyinfo_1.keyholder
15. 0.000 0.000 ↓ 0.0

Hash Join (cost=2,930.89..7,887.40 rows=91,780 width=12) (actual rows= loops=)

  • Hash Cond: ((lockkeyinfo_1.houseid)::text = (houseinfo_1.houseid)::text)
16. 0.000 0.000 ↓ 0.0

Seq Scan on lockkeyinfo lockkeyinfo_1 (cost=0.00..4,029.53 rows=201,736 width=47) (actual rows= loops=)

  • Filter: (((keyholder)::text > '1'::text) AND ((keyholder)::text < '2'::text))
17. 0.000 0.000 ↓ 0.0

Hash (cost=2,208.25..2,208.25 rows=54,403 width=35) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on houseinfo houseinfo_1 (cost=0.00..2,208.25 rows=54,403 width=35) (actual rows= loops=)

  • Filter: ((xzqhdm)::text ~~ '330522%'::text)JIT: