explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C3Ou

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 384.579 ↑ 1.0 1 1

Finalize Aggregate (cost=31,257.27..31,257.28 rows=1 width=32) (actual time=384.579..384.579 rows=1 loops=1)

2. 12.672 386.307 ↓ 1.2 5 1

Gather (cost=31,256.84..31,257.25 rows=4 width=32) (actual time=378.455..386.307 rows=5 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 1.137 373.635 ↑ 1.0 1 5 / 5

Partial Aggregate (cost=30,256.84..30,256.85 rows=1 width=32) (actual time=373.635..373.635 rows=1 loops=5)

4. 1.100 372.498 ↓ 51.3 1,129 5 / 5

Nested Loop (cost=119.77..30,256.72 rows=22 width=15) (actual time=7.078..372.498 rows=1,129 loops=5)

5. 0.725 80.064 ↓ 51.3 1,129 5 / 5

Hash Join (cost=119.36..29,814.71 rows=22 width=9) (actual time=6.816..80.064 rows=1,129 loops=5)

  • Hash Cond: (pt.currency = c.currency_code)
6. 78.976 78.976 ↓ 2.0 1,129 5 / 5

Parallel Seq Scan on sx_purchase_transactions pt (cost=0.00..29,693.85 rows=567 width=10) (actual time=6.355..78.976 rows=1,129 loops=5)

  • Filter: ((creation_date >= '2020-03-01 00:00:00+01'::timestamp with time zone) AND (creation_date <= '2020-03-19 00:00:00+01'::timestamp with time zone) AND (status = 'funded'::text))
  • Rows Removed by Filter: 58,583
7. 0.013 0.363 ↑ 1.2 33 5 / 5

Hash (cost=118.86..118.86 rows=40 width=45) (actual time=0.362..0.363 rows=33 loops=5)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
8. 0.350 0.350 ↑ 1.2 33 5 / 5

Seq Scan on sx_currencies c (cost=0.00..118.86 rows=40 width=45) (actual time=0.033..0.350 rows=33 loops=5)

  • Filter: ((currency_type = ANY ('{crypto,fiat}'::text[])) OR can_deposit)
  • Rows Removed by Filter: 991
9. 291.334 291.334 ↑ 1.0 1 5,646 / 5

Index Scan using sx_currency_rates_currency_idx on sx_currency_rates cr (cost=0.41..20.09 rows=1 width=14) (actual time=0.258..0.258 rows=1 loops=5,646)

  • Index Cond: (currency = c.currency)
Planning time : 0.750 ms
Execution time : 386.418 ms