explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dwc8 : or

Settings
# exclusive inclusive rows x rows loops node
1. 1.739 82,424.574 ↓ 11.8 1,000 1

Limit (cost=7,651,042.42..7,655,491.74 rows=85 width=28) (actual time=82,422.148..82,424.574 rows=1,000 loops=1)

2. 0.000 82,422.835 ↓ 11.8 1,000 1

Finalize GroupAggregate (cost=7,651,042.42..7,655,491.74 rows=85 width=28) (actual time=82,422.147..82,422.835 rows=1,000 loops=1)

  • Group Key: f0.uuid
  • Filter: (count(t1.reward_uuid) = f0.bet_count)
  • Rows Removed by Filter: 237
3. 17.735 82,424.072 ↑ 27.6 1,238 1

Gather Merge (cost=7,651,042.42..7,655,022.67 rows=34,114 width=36) (actual time=82,422.135..82,424.072 rows=1,238 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 1.731 82,406.337 ↑ 19.1 891 3 / 3

Sort (cost=7,650,042.40..7,650,085.04 rows=17,057 width=36) (actual time=82,406.261..82,406.337 rows=891 loops=3)

  • Sort Key: f0.uuid
  • Sort Method: quicksort Memory: 565kB
  • Worker 0: Sort Method: quicksort Memory: 561kB
  • Worker 1: Sort Method: quicksort Memory: 554kB
5. 52.687 82,404.606 ↑ 3.6 4,708 3 / 3

Partial HashAggregate (cost=7,648,672.89..7,648,843.46 rows=17,057 width=36) (actual time=82,403.458..82,404.606 rows=4,708 loops=3)

  • Group Key: f0.uuid
6. 22.257 82,351.919 ↑ 254.7 88,733 3 / 3

Nested Loop (cost=0.43..7,479,198.04 rows=22,596,646 width=44) (actual time=0.074..82,351.919 rows=88,733 loops=3)

7. 11.896 11.896 ↑ 1.4 5,111 3 / 3

Parallel Seq Scan on freebet_rewards f0 (cost=0.00..5,733.01 rows=7,107 width=20) (actual time=0.005..11.896 rows=5,111 loops=3)

  • Filter: ((status)::text = 'FRS_ACTIVE'::text)
  • Rows Removed by Filter: 15,263
8. 25.555 82,317.766 ↑ 2.8 17 15,333 / 3

Append (cost=0.43..1,051.09 rows=47 width=24) (actual time=1.013..16.106 rows=17 loops=15,333)

9. 61,710.214 61,710.214 ↓ 13.0 13 15,333 / 3

Index Scan using transactions_reward_uuid_kind_index on transactions_y2020m05 t1 (cost=0.43..8.27 rows=1 width=24) (actual time=0.580..12.074 rows=13 loops=15,333)

  • Index Cond: (reward_uuid = f0.uuid)
  • Filter: ((processed_at <= '2020-08-03 11:20:01.65683'::timestamp without time zone) AND (status = 'TS_SUCCESS'::ih_ecto_enum_transaction_status) AND ((kind = 'TK_BET'::ih_ecto_enum_transaction_kind) OR (kind = 'TK_FREE_BET'::ih_ecto_enum_transaction_kind)))
  • Rows Removed by Filter: 13
10. 9,981.783 9,981.783 ↑ 1.5 2 15,333 / 3

Index Scan using transactions_y2020m06_reward_uuid_kind_idx on transactions_y2020m06 t1_1 (cost=0.42..108.43 rows=3 width=24) (actual time=0.215..1.953 rows=2 loops=15,333)

  • Index Cond: (reward_uuid = f0.uuid)
  • Filter: ((processed_at <= '2020-08-03 11:20:01.65683'::timestamp without time zone) AND (status = 'TS_SUCCESS'::ih_ecto_enum_transaction_status) AND ((kind = 'TK_BET'::ih_ecto_enum_transaction_kind) OR (kind = 'TK_FREE_BET'::ih_ecto_enum_transaction_kind)))
  • Rows Removed by Filter: 2
11. 9,946.006 9,946.006 ↑ 18.0 2 15,333 / 3

Index Scan using transactions_y2020m07_reward_uuid_kind_idx on transactions_y2020m07 t1_2 (cost=0.42..792.09 rows=36 width=24) (actual time=0.212..1.946 rows=2 loops=15,333)

  • Index Cond: (reward_uuid = f0.uuid)
  • Filter: ((processed_at <= '2020-08-03 11:20:01.65683'::timestamp without time zone) AND (status = 'TS_SUCCESS'::ih_ecto_enum_transaction_status) AND ((kind = 'TK_BET'::ih_ecto_enum_transaction_kind) OR (kind = 'TK_FREE_BET'::ih_ecto_enum_transaction_kind)))
  • Rows Removed by Filter: 2
12. 649.097 649.097 ↓ 0.0 0 15,333 / 3

Index Scan using transactions_y2020m08_reward_uuid_kind_idx on transactions_y2020m08 t1_3 (cost=0.41..138.31 rows=6 width=24) (actual time=0.018..0.127 rows=0 loops=15,333)

  • Index Cond: (reward_uuid = f0.uuid)
  • Filter: ((processed_at <= '2020-08-03 11:20:01.65683'::timestamp without time zone) AND (status = 'TS_SUCCESS'::ih_ecto_enum_transaction_status) AND ((kind = 'TK_BET'::ih_ecto_enum_transaction_kind) OR (kind = 'TK_FREE_BET'::ih_ecto_enum_transaction_kind)))
  • Rows Removed by Filter: 0
13. 5.111 5.111 ↓ 0.0 0 15,333 / 3

Index Scan using transactions_y2020m09_reward_uuid_kind_idx on transactions_y2020m09 t1_4 (cost=0.12..3.75 rows=1 width=24) (actual time=0.001..0.001 rows=0 loops=15,333)

  • Index Cond: (reward_uuid = f0.uuid)
  • Filter: ((processed_at <= '2020-08-03 11:20:01.65683'::timestamp without time zone) AND (status = 'TS_SUCCESS'::ih_ecto_enum_transaction_status) AND ((kind = 'TK_BET'::ih_ecto_enum_transaction_kind) OR (kind = 'TK_FREE_BET'::ih_ecto_enum_transaction_kind)))
Planning time : 3.812 ms
Execution time : 82,425.283 ms