explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lXKf : Optimization for: plan #11S0

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 748.069 17,433.363 ↓ 5.0 3,373 1

Unique (cost=2,565.68..2,618.83 rows=677 width=37) (actual time=12,316.213..17,433.363 rows=3,373 loops=1)

2. 14,979.810 16,685.294 ↓ 936.2 9,951,531 1

Sort (cost=2,565.68..2,592.26 rows=10,630 width=37) (actual time=12,316.212..16,685.294 rows=9,951,531 loops=1)

  • Sort Key: subscription.unique_exchange_id
  • Sort Method: external merge Disk: 457744kB
3. 733.782 1,705.484 ↓ 936.2 9,951,531 1

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

4. 1.865 6.176 ↓ 8.0 5,394 1

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

  • Hash Cond: (subscription.subscription_type_id = subscription_type.id)
5. 4.160 4.160 ↓ 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.019..4.160 rows=5,394 loops=1)

  • Index Cond: ((partner_organization_ueid)::text = 'c2f7765c-a04c-4ace-9006-d13005b3a2c2'::text)
6. 0.046 0.151 ↑ 1.0 463 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
7. 0.105 0.105 ↑ 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.056..0.105 rows=463 loops=1)

  • Heap Fetches: 0
8. 965.526 965.526 ↓ 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.179 rows=1,845 loops=5,394)

  • Index Cond: (user_id = subscription.user_id)
  • Heap Fetches: 412529
Planning time : 0.381 ms
Execution time : 17,493.714 ms