explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2myR

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

HashAggregate (cost=1,639,449.68..1,639,449.70 rows=1 width=18) (actual rows= loops=)

  • Group Key: upper((transactions.user_currency)::text)
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.29..1,639,449.65 rows=1 width=18) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.87..1,639,447.58 rows=1 width=18) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..1,639,446.11 rows=1 width=22) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on transactions (cost=0.00..1,638,974.82 rows=191 width=22) (actual rows= loops=)

  • Filter: ((NOT is_hidden) AND (transaction_operation IS NULL) AND (_location = 154) AND ((transaction_type)::text = 'deposit'::text) AND ((transaction_status)::text = 'done'::text))
6. 0.000 0.000 ↓ 0.0

Index Scan using betslips_pkey on betslips (cost=0.43..2.46 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = transactions._betslip)
  • Filter: ((NOT is_test) AND (cashed_out_date >= '2019-09-30 22:00:00+00'::timestamp with time zone) AND (cashed_out_date <= '2019-10-31 22:59:59.999+00'::timestamp with time zone))
7. 0.000 0.000 ↓ 0.0

Index Only Scan using bets_pkey on bets (cost=0.43..1.46 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = transactions._bet)
8. 0.000 0.000 ↓ 0.0

Index Scan using clients_pkey on clients (cost=0.42..2.06 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = betslips._cashed_out_by)
  • Filter: (type = ANY ('{merchant,terminal}'::clients_type[]))