explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eb3

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

WindowAgg (cost=5,003,811.97..5,041,619.71 rows=1,890,387 width=54) (actual rows= loops=)

2.          

Initplan (for WindowAgg)

3. 0.000 0.000 ↓ 0.0

Finalize Aggregate (cost=61,140.21..61,140.22 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Gather (cost=61,140.00..61,140.21 rows=2 width=8) (actual rows= loops=)

  • Workers Planned: 2
5. 0.000 0.000 ↓ 0.0

Partial Aggregate (cost=60,140.00..60,140.01 rows=1 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on aggregate_transaction (cost=0.00..57,129.60 rows=1,204,160 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=4,942,671.75..4,947,397.72 rows=1,890,387 width=22) (actual rows= loops=)

  • Sort Key: transaction_history.client_id, transaction_history.dateodb
8. 0.000 0.000 ↓ 0.0

Hash Anti Join (cost=118,004.15..4,720,673.29 rows=1,890,387 width=22) (actual rows= loops=)

  • Hash Cond: ((transaction_history.transaction_id)::text = (t3.transaction_id)::text)
9. 0.000 0.000 ↓ 0.0

Hash Join (cost=105,020.34..4,644,490.16 rows=2,079,254 width=32) (actual rows= loops=)

  • Hash Cond: ((transaction_history.client_id)::text = (t2.client_id)::text)
10. 0.000 0.000 ↓ 0.0

Append (cost=0.00..4,471,939.68 rows=3,608,814 width=32) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on transaction_history (cost=0.00..0.00 rows=1 width=32) (actual rows= loops=)

  • Filter: ((dateodb >= '2020-03-13 00:00:00'::timestamp without time zone) AND (dateodb >= $1) AND (credit_amount > '0'::numeric) AND (resp_code = 1) AND (transaction_sort_id = 'DB'::bpchar))
12. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on dataexch_transaction_history_202003 (cost=425,550.28..4,471,939.68 rows=3,608,813 width=32) (actual rows= loops=)

  • Recheck Cond: ((dateodb >= '2020-03-13 00:00:00'::timestamp without time zone) AND (dateodb >= $1))
  • Filter: ((credit_amount > '0'::numeric) AND (resp_code = 1) AND (transaction_sort_id = 'DB'::bpchar))
13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on dataexch_transaction_history_202003_dateodb_client_id_idx (cost=0.00..424,648.08 rows=17,772,951 width=0) (actual rows= loops=)

  • Index Cond: ((dateodb >= '2020-03-13 00:00:00'::timestamp without time zone) AND (dateodb >= $1))
14. 0.000 0.000 ↓ 0.0

Hash (cost=73,987.84..73,987.84 rows=1,785,240 width=12) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on aggregate_transaction t2 (cost=0.00..73,987.84 rows=1,785,240 width=12) (actual rows= loops=)

  • Filter: (first_tran_db_credit_amount_for_defaults IS NULL)
16. 0.000 0.000 ↓ 0.0

Hash (cost=6,100.47..6,100.47 rows=395,947 width=10) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on excluded_tran_history_refresh t3 (cost=0.00..6,100.47 rows=395,947 width=10) (actual rows= loops=)