explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nbRv

Settings
# exclusive inclusive rows x rows loops node
1. 62.238 984.661 ↓ 0.0 0 1

Hash Left Join (cost=23,861.33..1,717,098.24 rows=63 width=4) (actual time=984.660..984.661 rows=0 loops=1)

  • Hash Cond: (auction_auction.id = auction_successfulcompletedauction.auction_id)
  • Filter: ((((wall_post.type)::text = 'purchase'::text) AND (wall_post.creator_id = 84307) AND (wall_post.previous_post_id IS NULL)) OR (((auction_auction.status)::text = 'sold'::text) AND (auction_successfulcompletedauction.winner_id = 84307) AND ((wall_post.creator_id <> 84307) OR (wall_post.creator_id IS NULL))) OR (((wall_post.type)::text = 'purchase'::text) AND (wall_post.creator_id = 84307) AND ((t3.type)::text = 'sale'::text)))
  • Rows Removed by Filter: 168669
2. 157.144 920.525 ↓ 2.0 168,669 1

Hash Left Join (cost=23,664.78..1,716,514.38 rows=84,889 width=34) (actual time=228.519..920.525 rows=168,669 loops=1)

  • Hash Cond: (wall_post.id = auction_auction.post_id)
3. 66.274 660.565 ↓ 2.0 168,669 1

Hash Left Join (cost=13,707.23..1,703,285.30 rows=84,889 width=22) (actual time=125.062..660.565 rows=168,669 loops=1)

  • Hash Cond: (wall_post.previous_post_id = t3.id)
4. 300.474 470.032 ↓ 2.0 168,669 1

Index Scan using wall_post_is_deleted_66239426 on wall_post (cost=0.42..1,687,133.29 rows=84,889 width=17) (actual time=0.057..470.032 rows=168,669 loops=1)

  • Index Cond: (is_deleted = false)
  • Filter: ((NOT is_deleted) AND (NOT (SubPlan 1)))
  • Rows Removed by Filter: 889
5.          

SubPlan (for Index Scan)

6. 169.558 169.558 ↓ 0.0 0 169,558

Index Scan using wall_post_previous_post_id_06bab8a8 on wall_post u0 (cost=0.42..9.76 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=169,558)

  • Index Cond: (previous_post_id = wall_post.id)
  • Filter: ((NOT is_deleted) AND (NOT is_draft))
  • Rows Removed by Filter: 0
7. 45.871 124.259 ↓ 1.0 228,237 1

Hash (cost=9,741.25..9,741.25 rows=228,125 width=9) (actual time=124.259..124.259 rows=228,237 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 3321kB
8. 78.388 78.388 ↓ 1.0 228,237 1

Seq Scan on wall_post t3 (cost=0.00..9,741.25 rows=228,125 width=9) (actual time=0.008..78.388 rows=228,237 loops=1)

9. 43.814 102.816 ↑ 1.0 219,614 1

Hash (cost=6,004.02..6,004.02 rows=227,402 width=16) (actual time=102.816..102.816 rows=219,614 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 3648kB
10. 59.002 59.002 ↑ 1.0 219,614 1

Seq Scan on auction_auction (cost=0.00..6,004.02 rows=227,402 width=16) (actual time=0.007..59.002 rows=219,614 loops=1)

11. 0.840 1.898 ↑ 1.0 6,122 1

Hash (cost=119.58..119.58 rows=6,158 width=8) (actual time=1.898..1.898 rows=6,122 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 304kB
12. 1.058 1.058 ↑ 1.0 6,122 1

Seq Scan on auction_successfulcompletedauction (cost=0.00..119.58 rows=6,158 width=8) (actual time=0.009..1.058 rows=6,122 loops=1)

Planning time : 0.792 ms
Execution time : 984.995 ms