explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hOV8

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 31.694 ↑ 1.0 30 1

Limit (cost=42,123.33..42,123.41 rows=30 width=160) (actual time=31.691..31.694 rows=30 loops=1)

2. 6.082 31.691 ↑ 1,240.5 30 1

Sort (cost=42,123.33..42,216.37 rows=37,216 width=160) (actual time=31.689..31.691 rows=30 loops=1)

  • Sort Key: seen_offer."dateSeen" NULLS FIRST, discovery_view_v3."offerDiscoveryOrder
  • Sort Method: top-N heapsort Memory: 35kB
3. 4.710 25.609 ↑ 2.0 18,612 1

Merge Right Join (cost=45.93..41,024.18 rows=37,216 width=160) (actual time=0.027..25.609 rows=18,612 loops=1)

  • Merge Cond: (seen_offer."offerId" = discovery_view_v3.id)
4. 0.003 0.016 ↓ 0.0 0 1

Sort (cost=45.64..45.75 rows=43 width=16) (actual time=0.016..0.016 rows=0 loops=1)

  • Sort Key: seen_offer."offerId
  • Sort Method: quicksort Memory: 25kB
5. 0.013 0.013 ↓ 0.0 0 1

Index Scan using "ix_seen_offer_userId" on seen_offer (cost=0.42..44.48 rows=43 width=16) (actual time=0.012..0.013 rows=0 loops=1)

  • Index Cond: ("userId" = 2)
6. 20.883 20.883 ↑ 2.0 18,612 1

Index Scan using idx_discovery_v3_offer on discovery_view_v3 (cost=0.29..40,884.82 rows=37,216 width=152) (actual time=0.009..20.883 rows=18,612 loops=1)

Planning time : 1.051 ms
Execution time : 31.756 ms