explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NfrR

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 0.171 ↑ 1.0 1 1

Insert on bnbcalendar_pendings (cost=39.73..39.74 rows=1 width=4) (actual time=0.169..0.171 rows=1 loops=1)

2. 0.001 0.154 ↑ 1.0 1 1

Subquery Scan on *SELECT* (cost=39.73..39.74 rows=1 width=4) (actual time=0.152..0.154 rows=1 loops=1)

3. 0.002 0.153 ↑ 1.0 1 1

Limit (cost=39.73..39.73 rows=1 width=36) (actual time=0.151..0.153 rows=1 loops=1)

4. 0.009 0.151 ↑ 2.0 1 1

Sort (cost=39.73..39.74 rows=2 width=36) (actual time=0.151..0.151 rows=1 loops=1)

  • Sort Key: ('1'::text)
  • Sort Method: quicksort Memory: 25kB
5. 0.003 0.142 ↑ 1.0 2 1

Unique (cost=39.69..39.70 rows=2 width=36) (actual time=0.139..0.142 rows=2 loops=1)

6. 0.006 0.139 ↑ 1.0 2 1

Sort (cost=39.69..39.69 rows=2 width=36) (actual time=0.139..0.139 rows=2 loops=1)

  • Sort Key: ls.id, ('1'::text)
  • Sort Method: quicksort Memory: 25kB
7. 0.001 0.133 ↑ 1.0 2 1

Append (cost=19.49..39.68 rows=2 width=36) (actual time=0.101..0.133 rows=2 loops=1)

8. 0.001 0.102 ↑ 1.0 1 1

Limit (cost=19.49..20.04 rows=1 width=36) (actual time=0.101..0.102 rows=1 loops=1)

9. 0.004 0.101 ↑ 509,799.0 1 1

Nested Loop Anti Join (cost=19.49..282,415.02 rows=509,799 width=36) (actual time=0.100..0.101 rows=1 loops=1)

10. 0.011 0.034 ↑ 73,112.9 7 1

Seq Scan on listings ls (cost=19.06..54,364.82 rows=511,790 width=4) (actual time=0.032..0.034 rows=7 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
11.          

SubPlan (for Seq Scan)

12. 0.023 0.023 ↓ 0.0 0 1

Seq Scan on bnbcalendar_pendings bnbcalendar_pendings_1 (cost=0.00..19.05 rows=5 width=4) (actual time=0.023..0.023 rows=0 loops=1)

13. 0.063 0.063 ↑ 341.0 1 7

Index Only Scan using idx_id_lastupdate on bnbcalendar bc (cost=0.43..6.55 rows=341 width=4) (actual time=0.009..0.009 rows=1 loops=7)

  • Index Cond: (propid = ls.id)
  • Heap Fetches: 6
14. 0.001 0.030 ↑ 1.0 1 1

Subquery Scan on *SELECT* 2 (cost=19.49..19.61 rows=1 width=36) (actual time=0.030..0.030 rows=1 loops=1)

15. 0.000 0.029 ↑ 1.0 1 1

Limit (cost=19.49..19.60 rows=1 width=44) (actual time=0.029..0.029 rows=1 loops=1)

16. 0.020 0.029 ↑ 676,863.0 1 1

Index Only Scan Backward using idx_3 on bnbcalendar bc_1 (cost=19.49..74,175.69 rows=676,863 width=44) (actual time=0.029..0.029 rows=1 loops=1)

  • Index Cond: (cdate >= CURRENT_DATE)
  • Filter: (NOT (hashed SubPlan 2))
  • Heap Fetches: 1
17.          

SubPlan (for Index Only Scan Backward)

18. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on bnbcalendar_pendings bnbcalendar_pendings_2 (cost=0.00..19.05 rows=5 width=4) (actual time=0.009..0.009 rows=0 loops=1)