explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zZ58

Settings
# exclusive inclusive rows x rows loops node
1. 137.535 42,080.158 ↓ 2.8 293,139 1

Gather Merge (cost=238,965.31..251,623.66 rows=105,720 width=94) (actual time=41,972.350..42,080.158 rows=293,139 loops=1)

  • Workers Planned: 4
  • Workers Launched: 3
2. 121.737 41,942.623 ↓ 2.8 73,285 4 / 4

Sort (cost=237,965.26..238,031.33 rows=26,430 width=94) (actual time=41,937.835..41,942.623 rows=73,285 loops=4)

  • Sort Key: member_userbalancetransaction.id
  • Sort Method: quicksort Memory: 13,379kB
  • Worker 0: Sort Method: quicksort Memory: 13,359kB
  • Worker 1: Sort Method: quicksort Memory: 13,395kB
  • Worker 2: Sort Method: quicksort Memory: 13,380kB
3. 49.353 41,820.886 ↓ 2.8 73,285 4 / 4

Nested Loop Left Join (cost=155.61..236,023.99 rows=26,430 width=94) (actual time=3.283..41,820.886 rows=73,285 loops=4)

4. 70.123 3,150.470 ↓ 2.8 73,285 4 / 4

Hash Left Join (cost=155.05..161,952.50 rows=26,430 width=89) (actual time=2.361..3,150.470 rows=73,285 loops=4)

  • Hash Cond: (member_userbalancetransaction.promo_price_id = promo_prices.id)
5. 105.209 3,078.141 ↓ 2.8 73,285 4 / 4

Nested Loop Left Join (cost=0.43..161,728.49 rows=26,430 width=89) (actual time=0.041..3,078.141 rows=73,285 loops=4)

6. 2,679.793 2,679.793 ↓ 2.8 73,285 4 / 4

Parallel Seq Scan on member_userbalancetransaction (cost=0.00..112,503.75 rows=26,430 width=56) (actual time=0.038..2,679.793 rows=73,285 loops=4)

  • Filter: ((operation_type IS NOT NULL) AND (created_at >= '2020-08-03 03:05:29.07606+00'::timestamp with time zone) AND (created_at <= '2020-09-02 03:05:29.07606+00'::timestamp with time zone) AND ((operation_source <> 1) OR (operation_source IS NULL)))
  • Rows Removed by Filter: 1,356,448
7. 293.139 293.139 ↓ 0.0 0 293,139 / 4

Index Scan using payment_callbacks_pkey on payment_callbacks (cost=0.43..1.86 rows=1 width=41) (actual time=0.004..0.004 rows=0 loops=293,139)

  • Index Cond: (member_userbalancetransaction.wfp_callback_id = id)
8. 0.801 2.206 ↑ 1.0 5,272 4 / 4

Hash (cost=88.72..88.72 rows=5,272 width=8) (actual time=2.205..2.206 rows=5,272 loops=4)

  • Buckets: 8,192 Batches: 1 Memory Usage: 270kB
9. 1.405 1.405 ↑ 1.0 5,272 4 / 4

Seq Scan on promo_prices (cost=0.00..88.72 rows=5,272 width=8) (actual time=0.022..1.405 rows=5,272 loops=4)

10. 38,621.063 38,621.063 ↑ 1.0 1 293,139 / 4

Index Scan using products_pkey on products (cost=0.56..2.80 rows=1 width=9) (actual time=0.527..0.527 rows=1 loops=293,139)

  • Index Cond: (member_userbalancetransaction.product_id = id)
Planning time : 16.075 ms
Execution time : 42,102.479 ms