explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hbts

Settings
# exclusive inclusive rows x rows loops node
1. 0.085 0.899 ↓ 29.0 29 1

Nested Loop Left Join (cost=2.78..35.97 rows=1 width=3,631) (actual time=0.110..0.899 rows=29 loops=1)

2. 0.036 0.585 ↓ 21.0 21 1

Nested Loop (cost=2.36..19.86 rows=1 width=3,551) (actual time=0.071..0.585 rows=21 loops=1)

3. 0.041 0.481 ↓ 17.0 17 1

Nested Loop (cost=1.94..19.24 rows=1 width=3,306) (actual time=0.062..0.481 rows=17 loops=1)

4. 0.039 0.372 ↓ 17.0 17 1

Nested Loop (cost=1.52..18.63 rows=1 width=2,566) (actual time=0.053..0.372 rows=17 loops=1)

5. 0.035 0.299 ↓ 17.0 17 1

Nested Loop (cost=1.39..17.65 rows=1 width=2,273) (actual time=0.043..0.299 rows=17 loops=1)

6. 0.025 0.230 ↓ 17.0 17 1

Nested Loop (cost=1.25..17.49 rows=1 width=1,321) (actual time=0.035..0.230 rows=17 loops=1)

7. 0.023 0.137 ↓ 17.0 17 1

Nested Loop (cost=0.83..16.87 rows=1 width=579) (actual time=0.025..0.137 rows=17 loops=1)

8. 0.029 0.029 ↓ 17.0 17 1

Index Scan using unique_favorite on favorite (cost=0.42..8.44 rows=1 width=32) (actual time=0.015..0.029 rows=17 loops=1)

  • Index Cond: ("userId" = 629)
9. 0.085 0.085 ↑ 1.0 1 17

Index Scan using offer_pkey on offer offer_1 (cost=0.42..8.44 rows=1 width=547) (actual time=0.005..0.005 rows=1 loops=17)

  • Index Cond: (id = favorite."offerId")
10. 0.068 0.068 ↑ 1.0 1 17

Index Scan using product_pkey on product product_1 (cost=0.42..0.62 rows=1 width=742) (actual time=0.004..0.004 rows=1 loops=17)

  • Index Cond: (id = offer_1."productId")
11. 0.034 0.034 ↑ 1.0 1 17

Index Scan using venue_pkey on venue venue_1 (cost=0.14..0.16 rows=1 width=952) (actual time=0.002..0.002 rows=1 loops=17)

  • Index Cond: (id = offer_1."venueId")
12. 0.034 0.034 ↑ 1.0 1 17

Index Scan using offerer_pkey on offerer offerer_1 (cost=0.14..0.88 rows=1 width=293) (actual time=0.002..0.002 rows=1 loops=17)

  • Index Cond: (id = venue_1."managingOffererId")
13. 0.068 0.068 ↑ 1.0 1 17

Index Scan using "ix_mediation_offerId" on mediation mediation_1 (cost=0.42..0.60 rows=1 width=740) (actual time=0.004..0.004 rows=1 loops=17)

  • Index Cond: ("offerId" = offer_1.id)
14. 0.068 0.068 ↑ 1.0 1 17

Index Scan using "ix_stock_offerId" on stock stock_1 (cost=0.42..0.62 rows=1 width=245) (actual time=0.003..0.004 rows=1 loops=17)

  • Index Cond: ("offerId" = offer_1.id)
15. 0.084 0.084 ↑ 1.0 1 21

Index Scan using "ix_booking_stockId" on booking booking_1 (cost=0.42..0.60 rows=1 width=72) (actual time=0.003..0.004 rows=1 loops=21)

  • Index Cond: (stock_1.id = "stockId")
16.          

SubPlan (for Nested Loop Left Join)

17. 0.029 0.145 ↑ 1.0 1 29

Aggregate (cost=15.48..15.49 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=29)

18. 0.045 0.116 ↓ 0.0 0 29

Hash Join (cost=5.28..15.46 rows=8 width=4) (actual time=0.004..0.004 rows=0 loops=29)

  • Hash Cond: (offer_criterion."criterionId" = criterion.id)
19. 0.029 0.058 ↓ 0.0 0 29

Bitmap Heap Scan on offer_criterion (cost=4.21..14.37 rows=8 width=8) (actual time=0.002..0.002 rows=0 loops=29)

  • Recheck Cond: ("offerId" = offer_1.id)
20. 0.029 0.029 ↓ 0.0 0 29

Bitmap Index Scan on "idx_offer_criterion_offerId" (cost=0.00..4.21 rows=8 width=0) (actual time=0.001..0.001 rows=0 loops=29)

  • Index Cond: ("offerId" = offer_1.id)
21. 0.004 0.013 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=12) (actual time=0.012..0.013 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
22. 0.009 0.009 ↑ 1.0 3 1

Seq Scan on criterion (cost=0.00..1.03 rows=3 width=12) (actual time=0.008..0.009 rows=3 loops=1)

Planning time : 7.262 ms
Execution time : 1.125 ms