explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q6BO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 8.159 ↓ 6.0 6 1

Nested Loop (cost=2.06..14.26 rows=1 width=1,309) (actual time=0.072..8.159 rows=6 loops=1)

2. 0.610 2.643 ↓ 1,854.0 1,854 1

Nested Loop (cost=1.65..13.62 rows=1 width=216) (actual time=0.060..2.643 rows=1,854 loops=1)

3. 0.005 0.153 ↓ 3.3 40 1

Append (cost=1.09..4.14 rows=12 width=79) (actual time=0.042..0.153 rows=40 loops=1)

4. 0.014 0.042 ↑ 4.0 1 1

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

  • Recheck Cond: (('15067121276'::text = (keyholder)::text) OR ('15067121276'::text = (useraccount)::text))
  • Filter: (userrole <> 255)
  • Rows Removed by Filter: 3
  • Heap Blocks: exact=4
5. 0.001 0.028 ↓ 0.0 0 1

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

6. 0.016 0.016 ↑ 3.0 1 1

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

  • Index Cond: ((keyholder)::text = '15067121276'::text)
7. 0.011 0.011 ↓ 1.3 4 1

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

  • Index Cond: ((useraccount)::text = '15067121276'::text)
8. 0.083 0.106 ↓ 4.9 39 1

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

  • Recheck Cond: (('15067121276'::text = (keyholder)::text) OR ('15067121276'::text = (useraccount)::text))
  • Filter: (userrole <> 255)
  • Rows Removed by Filter: 21
  • Heap Blocks: exact=44
9. 0.000 0.023 ↓ 0.0 0 1

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

10. 0.013 0.013 ↓ 14.8 59 1

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

  • Index Cond: ((keyholder)::text = '15067121276'::text)
11. 0.010 0.010 ↓ 12.0 60 1

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

  • Index Cond: ((useraccount)::text = '15067121276'::text)
12. 1.880 1.880 ↓ 46.0 46 40

Index Scan using opendoorrecord_userid_lockid_idx on opendoorrecord (cost=0.56..0.78 rows=1 width=137) (actual time=0.027..0.047 rows=46 loops=40)

  • Index Cond: (((userid)::text = (lockkeyinfo.keyholder)::text) AND ((lockid)::text = (lockkeyinfo.lockid)::text))
13. 5.562 5.562 ↓ 0.0 0 1,854

Index Scan using houseinfo_pkey on houseinfo (cost=0.42..0.64 rows=1 width=1,128) (actual time=0.003..0.003 rows=0 loops=1,854)

  • Index Cond: ((houseid)::text = (lockkeyinfo.houseid)::text)
  • Filter: ((xzqhdm)::text ~~ '330522%'::text)
  • Rows Removed by Filter: 1
Planning time : 0.560 ms
Execution time : 8.220 ms