explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eOHj

Settings
# exclusive inclusive rows x rows loops node
1. 1.140 2.308 ↑ 1.0 1 1

Aggregate (cost=15.50..15.51 rows=1 width=3) (actual time=2.308..2.308 rows=1 loops=1)

2. 0.287 1.168 ↓ 726.0 726 1

Nested Loop (cost=5.81..15.43 rows=1 width=44) (actual time=0.079..1.168 rows=726 loops=1)

  • Join Filter: ((lockkeyinfo.lockid)::text = (billrecord.lockid)::text)
3. 0.020 0.353 ↓ 66.0 66 1

Nested Loop (cost=5.39..14.77 rows=1 width=137) (actual time=0.070..0.353 rows=66 loops=1)

4. 0.015 0.135 ↓ 66.0 66 1

Nested Loop (cost=4.97..14.13 rows=1 width=235) (actual time=0.061..0.135 rows=66 loops=1)

5. 0.006 0.042 ↑ 12.0 1 1

HashAggregate (cost=4.41..4.53 rows=12 width=316) (actual time=0.042..0.042 rows=1 loops=1)

  • Group Key: lockkeyinfo.houseid, lockkeyinfo.lockid, lockkeyinfo.keyholder, lockkeyinfo.useraccount, lockkeyinfo.userrole
6. 0.001 0.036 ↑ 6.0 2 1

Append (cost=1.09..4.26 rows=12 width=316) (actual time=0.022..0.036 rows=2 loops=1)

7. 0.006 0.022 ↑ 4.0 1 1

Bitmap Heap Scan on lockkeyinfo (cost=1.09..1.91 rows=4 width=82) (actual time=0.022..0.022 rows=1 loops=1)

  • Recheck Cond: (('13002612782'::text = (keyholder)::text) OR ('13002612782'::text = (useraccount)::text))
  • Filter: (userrole <> 255)
  • Heap Blocks: exact=1
8. 0.001 0.016 ↓ 0.0 0 1

BitmapOr (cost=1.09..1.09 rows=7 width=0) (actual time=0.016..0.016 rows=0 loops=1)

9. 0.009 0.009 ↑ 3.0 1 1

Bitmap Index Scan on lockkeyinfo_keyholder_idx (cost=0.00..0.54 rows=3 width=0) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: ((keyholder)::text = '13002612782'::text)
10. 0.006 0.006 ↑ 3.0 1 1

Bitmap Index Scan on lockkeyinfo_useraccount_idx (cost=0.00..0.54 rows=3 width=0) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: ((useraccount)::text = '13002612782'::text)
11. 0.002 0.013 ↑ 8.0 1 1

Bitmap Heap Scan on keyhistoryinfo (cost=1.11..2.17 rows=8 width=78) (actual time=0.013..0.013 rows=1 loops=1)

  • Recheck Cond: (('13002612782'::text = (keyholder)::text) OR ('13002612782'::text = (useraccount)::text))
  • Filter: (userrole <> 255)
  • Heap Blocks: exact=1
12. 0.000 0.011 ↓ 0.0 0 1

BitmapOr (cost=1.11..1.11 rows=9 width=0) (actual time=0.011..0.011 rows=0 loops=1)

13. 0.006 0.006 ↑ 4.0 1 1

Bitmap Index Scan on keyhistoryinfo_keyholder_idx (cost=0.00..0.55 rows=4 width=0) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: ((keyholder)::text = '13002612782'::text)
14. 0.005 0.005 ↑ 5.0 1 1

Bitmap Index Scan on keyhistoryinfo_useraccount_idx (cost=0.00..0.56 rows=5 width=0) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: ((useraccount)::text = '13002612782'::text)
15. 0.078 0.078 ↓ 66.0 66 1

Index Scan using opendoorrecord_userid_lockid_idx on opendoorrecord (cost=0.56..0.78 rows=1 width=51) (actual time=0.017..0.078 rows=66 loops=1)

  • Index Cond: (((userid)::text = (lockkeyinfo.keyholder)::text) AND ((lockid)::text = (lockkeyinfo.lockid)::text))
16. 0.198 0.198 ↑ 1.0 1 66

Index Scan using houseinfo_pkey on houseinfo (cost=0.42..0.64 rows=1 width=35) (actual time=0.003..0.003 rows=1 loops=66)

  • Index Cond: ((houseid)::text = (lockkeyinfo.houseid)::text)
  • Filter: ((xzqhdm)::text ~~ '330522%'::text)
17. 0.528 0.528 ↓ 1.4 11 66

Index Scan using billrecord_lockid_idx on billrecord (cost=0.42..0.56 rows=8 width=43) (actual time=0.003..0.008 rows=11 loops=66)

  • Index Cond: ((lockid)::text = (opendoorrecord.lockid)::text)
Planning time : 0.667 ms
Execution time : 2.384 ms