explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uwwV

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

HashAggregate (cost=80,566.30..80,580.70 rows=1,440 width=5,373) (actual rows= loops=)

  • Group Key: crypto_transactions.id, crypto_transactions.transaction_type, crypto_transactions.gross_amount, crypto_transactions.transaction_hash, crypto_transactions.from_address, crypto_transactions.from_account_id, crypto_transactions.to_account_id, crypto_transactions.to_address, crypto_transactions.state, crypto_transactions.created_at, crypto_transactions.updated_at, crypto_transactions.network_fee, crypto_transactions.from_role, crypto_transactions.to_role, crypto_transactions.exchange_fee, crypto_transactions.execution_id, crypto_transactions.bundle_index, crypto_transactions.generated_for_type, crypto_transactions.generated_for_id, crypto_transactions.reconciled, crypto_transactions.notes, crypto_transactions.block_height, crypto_transactions.currency, crypto_transactions.system_margin_side, crypto_transactions.action_id, (array_agg(hd_addresses.address))
2. 0.000 0.000 ↓ 0.0

Append (cost=28,331.98..80,472.70 rows=1,440 width=5,373) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=28,331.98..35,808.68 rows=480 width=313) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on crypto_transactions (cost=28,321.62..30,819.87 rows=480 width=281) (actual rows= loops=)

  • Recheck Cond: (((transaction_type)::text = 'funding'::text) AND (created_at >= '2018-01-01 00:00:00'::timestamp without time zone) AND (transaction_hash IS NOT NULL))
  • Filter: ((currency)::text = 'BTC'::text)
5. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=28,321.62..28,321.62 rows=630 width=0) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_crypto_transactions_on_transaction_type_and_created (cost=0.00..1,380.80 rows=51,223 width=0) (actual rows= loops=)

  • Index Cond: (((transaction_type)::text = 'funding'::text) AND (created_at >= '2018-01-01 00:00:00'::timestamp without time zone))
7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_bitcoin_transactions_on_transaction_hash (cost=0.00..26,940.33 rows=1,422,902 width=0) (actual rows= loops=)

  • Index Cond: (transaction_hash IS NOT NULL)
8. 0.000 0.000 ↓ 0.0

Aggregate (cost=10.36..10.37 rows=1 width=32) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using index_hd_addresses_on_account_id_and_id on hd_addresses (cost=0.43..10.36 rows=2 width=38) (actual rows= loops=)

  • Index Cond: (account_id = crypto_transactions.to_account_id)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=29,713.02..44,649.62 rows=960 width=313) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on crypto_transactions crypto_transactions_1 (cost=29,702.66..34,672.00 rows=960 width=281) (actual rows= loops=)

  • Recheck Cond: (((transaction_type)::text = ANY ('{withdrawal,manual_withdrawal}'::text[])) AND (created_at >= '2018-01-01 00:00:00'::timestamp without time zone) AND (transaction_hash IS NOT NULL))
  • Filter: ((currency)::text = 'BTC'::text)
12. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=29,702.66..29,702.66 rows=1,260 width=0) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_crypto_transactions_on_transaction_type_and_created (cost=0.00..2,761.60 rows=102,446 width=0) (actual rows= loops=)

  • Index Cond: (((transaction_type)::text = ANY ('{withdrawal,manual_withdrawal}'::text[])) AND (created_at >= '2018-01-01 00:00:00'::timestamp without time zone))
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_bitcoin_transactions_on_transaction_hash (cost=0.00..26,940.33 rows=1,422,902 width=0) (actual rows= loops=)

  • Index Cond: (transaction_hash IS NOT NULL)
15. 0.000 0.000 ↓ 0.0

Aggregate (cost=10.36..10.37 rows=1 width=32) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using index_hd_addresses_on_account_id_and_id on hd_addresses hd_addresses_1 (cost=0.43..10.36 rows=2 width=38) (actual rows= loops=)

  • Index Cond: (account_id = crypto_transactions_1.from_account_id)