explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FP6e

Settings
# exclusive inclusive rows x rows loops node
1. 5.642 48.795 ↓ 18.4 5,396 1

Hash Join (cost=5.59..664.22 rows=293 width=1,347) (actual time=0.092..48.795 rows=5,396 loops=1)

  • Hash Cond: (imsi.account_id = a.account_id)
2. 3.701 43.127 ↓ 18.4 5,396 1

Nested Loop (cost=1.40..659.26 rows=293 width=1,186) (actual time=0.057..43.127 rows=5,396 loops=1)

  • Join Filter: (sim_subscription.sim_id = imsi.active_on_sim_id)
3. 7.722 28.624 ↓ 17.0 5,401 1

Nested Loop (cost=0.98..505.01 rows=317 width=863) (actual time=0.048..28.624 rows=5,401 loops=1)

4. 5.786 15.501 ↓ 17.0 5,401 1

Nested Loop (cost=0.56..247.33 rows=317 width=352) (actual time=0.038..15.501 rows=5,401 loops=1)

5. 2.356 4.188 ↓ 22.7 5,527 1

Nested Loop (cost=0.28..165.35 rows=244 width=308) (actual time=0.027..4.188 rows=5,527 loops=1)

6. 0.116 0.116 ↓ 20.4 143 1

Seq Scan on account_subscription_item asi (cost=0.00..17.78 rows=7 width=66) (actual time=0.014..0.116 rows=143 loops=1)

  • Filter: ((c_subscription_item_type)::text = ANY ('{PRICEPLAN-NETWORKPRICELIST,PRICEPLAN-POSTPAID-FLEX,PRICEPLAN-POSTPAID-INDIVIDUAL,PRICEPLAN-POSTPAID-STATIC,PRICEPLAN-PREPAID-FLEX,PRICEPLAN-PREPAID-INDIVIDUAL,PRICEPLAN-PREPAID-STATIC}'::text[]))
  • Rows Removed by Filter: 16
7. 1.716 1.716 ↑ 1.1 39 143

Index Scan using ix_fk_account_si__subscription on subscription sub (cost=0.28..20.65 rows=43 width=242) (actual time=0.002..0.012 rows=39 loops=143)

  • Index Cond: (account_subscription_item_id = asi.account_subscription_item_id)
8. 5.527 5.527 ↑ 1.0 1 5,527

Index Scan using ix_fk_subscription__sim_subscription on sim_subscription (cost=0.28..0.33 rows=1 width=44) (actual time=0.001..0.001 rows=1 loops=5,527)

  • Index Cond: (subscription_id = sub.subscription_id)
9. 5.401 5.401 ↑ 1.0 1 5,401

Index Scan using pk_sim on sim (cost=0.42..0.81 rows=1 width=511) (actual time=0.001..0.001 rows=1 loops=5,401)

  • Index Cond: (sim_id = sim_subscription.sim_id)
10. 10.802 10.802 ↑ 1.0 1 5,401

Index Scan using "IX_fk_sim__active_profile" on imsi (cost=0.41..0.47 rows=1 width=323) (actual time=0.001..0.002 rows=1 loops=5,401)

  • Index Cond: (active_on_sim_id = sim.sim_id)
11. 0.012 0.026 ↓ 1.1 57 1

Hash (cost=3.53..3.53 rows=53 width=161) (actual time=0.026..0.026 rows=57 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 17kB
12. 0.014 0.014 ↓ 1.1 57 1

Seq Scan on account a (cost=0.00..3.53 rows=53 width=161) (actual time=0.004..0.014 rows=57 loops=1)

Planning time : 2.166 ms
Execution time : 49.203 ms