explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oLG5 : Optimization for: Optimization for: Optimization for: plan #11S0; plan #lXKf; plan #h9hJ

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1,987.442 3,962.852 ↓ 5.0 3,373 1

HashAggregate (cost=1,881.33..1,888.10 rows=677 width=37) (actual time=3,962.273..3,962.852 rows=3,373 loops=1)

  • Group Key: subscription.unique_exchange_id
2. 836.935 1,975.410 ↓ 936.2 9,951,531 1

Nested Loop (cost=18.39..1,854.76 rows=10,630 width=37) (actual time=0.137..1,975.410 rows=9,951,531 loops=1)

3. 1.749 5.735 ↓ 8.0 5,394 1

Hash Join (cost=17.96..789.49 rows=677 width=41) (actual time=0.127..5.735 rows=5,394 loops=1)

  • Hash Cond: (subscription.subscription_type_id = subscription_type.id)
4. 3.881 3.881 ↓ 8.0 5,394 1

Index Scan using ix_subscription_partner_organization_ueid on subscription (cost=0.56..770.30 rows=677 width=45) (actual time=0.018..3.881 rows=5,394 loops=1)

  • Index Cond: ((partner_organization_ueid)::text = 'c2f7765c-a04c-4ace-9006-d13005b3a2c2'::text)
5. 0.056 0.105 ↑ 1.0 463 1

Hash (cost=11.62..11.62 rows=463 width=4) (actual time=0.105..0.105 rows=463 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
6. 0.049 0.049 ↑ 1.0 463 1

Index Only Scan using subscription_type_pkey on subscription_type (cost=0.27..11.62 rows=463 width=4) (actual time=0.010..0.049 rows=463 loops=1)

  • Heap Fetches: 0
7. 1,132.740 1,132.740 ↓ 615.0 1,845 5,394

Index Only Scan using ix_box_fk_box_user_id on box (cost=0.43..1.54 rows=3 width=4) (actual time=0.004..0.210 rows=1,845 loops=5,394)

  • Index Cond: (user_id = subscription.user_id)
  • Heap Fetches: 412529
Planning time : 0.387 ms
Execution time : 3,963.001 ms