explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yvud

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 1,191.139 ↑ 1.0 20 1

Limit (cost=5,626.06..118,147.00 rows=20 width=170) (actual time=74.042..1,191.139 rows=20 loops=1)

2. 0.125 1,191.118 ↑ 2,596.7 20 1

Nested Loop (cost=5,626.06..292,188,756.84 rows=51,934 width=170) (actual time=74.041..1,191.118 rows=20 loops=1)

3. 0.078 1.093 ↑ 2,596.7 20 1

Nested Loop (cost=8.12..424,843.23 rows=51,934 width=186) (actual time=0.026..1.093 rows=20 loops=1)

4. 0.055 0.055 ↑ 2,596.7 20 1

Seq Scan on houseinfo (cost=0.00..1,460.88 rows=51,934 width=146) (actual time=0.008..0.055 rows=20 loops=1)

  • Filter: ((xzqhdm)::text ~~ '330522%'::text)
  • Rows Removed by Filter: 12
5. 0.380 0.960 ↑ 1.0 1 20

Aggregate (cost=8.12..8.13 rows=1 width=40) (actual time=0.048..0.048 rows=1 loops=20)

6. 0.580 0.580 ↑ 4.5 11 20

Index Scan using opendoorrecord_houseid_idx on opendoorrecord (cost=0.43..6.28 rows=49 width=20) (actual time=0.013..0.029 rows=11 loops=20)

  • Index Cond: ((houseid)::text = (houseinfo.houseid)::text)
7. 0.220 1,189.900 ↑ 1.0 1 20

Aggregate (cost=5,617.94..5,617.95 rows=1 width=32) (actual time=59.494..59.495 rows=1 loops=20)

8. 0.260 1,189.680 ↑ 610.5 2 20

Nested Loop (cost=0.94..5,614.88 rows=1,221 width=32) (actual time=19.566..59.484 rows=2 loops=20)

9. 250.572 1,189.420 ↑ 610.5 2 20

Hash Join (cost=0.94..5,578.25 rows=1,221 width=124) (actual time=19.556..59.471 rows=2 loops=20)

  • Hash Cond: ((appuseraccount.account)::text = (COALESCE(lockkeyinfo.keyholder, lockkeyinfo.useraccount))::text)
10. 235.433 938.468 ↓ 1.0 122,160 17

Append (cost=0.00..3,885.90 rows=122,124 width=154) (actual time=0.004..55.204 rows=122,160 loops=17)

11. 670.650 670.650 ↑ 1.0 118,285 17

Seq Scan on appuseraccount (cost=0.00..2,000.25 rows=118,285 width=71) (actual time=0.003..39.450 rows=118,285 loops=17)

12. 10.523 32.385 ↓ 1.0 3,875 17

Subquery Scan on *SELECT* 2 (cost=0.00..92.18 rows=3,839 width=78) (actual time=0.005..1.905 rows=3,875 loops=17)

13. 21.862 21.862 ↓ 1.0 3,875 17

Seq Scan on bluekeyuserinfo (cost=0.00..53.79 rows=3,839 width=104) (actual time=0.005..1.286 rows=3,875 loops=17)

14. 0.060 0.380 ↑ 1.0 2 20

Hash (cost=0.91..0.91 rows=2 width=58) (actual time=0.019..0.019 rows=2 loops=20)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.320 0.320 ↑ 1.0 2 20

Index Scan using lockkeyinfo_houseid_idx on lockkeyinfo (cost=0.42..0.91 rows=2 width=58) (actual time=0.014..0.016 rows=2 loops=20)

  • Index Cond: ((houseid)::text = (houseinfo.houseid)::text)
  • Filter: ((keystate = 0) AND ((expireddate)::text > (timezone('PRC'::text, now()))::text))
  • Rows Removed by Filter: 0
16. 0.000 0.000 ↑ 1.0 1 30

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=30)

Planning time : 0.839 ms
Execution time : 1,191.243 ms