explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4iZO : advisoraccount

Settings
# exclusive inclusive rows x rows loops node
1. 10.573 8,792.871 ↑ 1.0 1 1

Aggregate (cost=300,979.65..300,979.66 rows=1 width=8) (actual time=8,792.868..8,792.871 rows=1 loops=1)

2. 22.336 8,782.298 ↓ 1.0 8,026 1

Group (cost=150,723.36..300,879.78 rows=7,990 width=536) (actual time=8,748.445..8,782.298 rows=8,026 loops=1)

  • Group Key: user_profile_advisoraccount.id, ((SubPlan 1)), ((SubPlan 2)), ((SubPlan 3))
3. 33.569 8,759.962 ↓ 1.0 8,026 1

Sort (cost=150,723.36..150,743.33 rows=7,990 width=536) (actual time=8,748.439..8,759.962 rows=8,026 loops=1)

  • Sort Key: user_profile_advisoraccount.id, ((SubPlan 1)), ((SubPlan 2)), ((SubPlan 3))
  • Sort Method: quicksort Memory: 654kB
4. 90.417 8,726.393 ↓ 1.0 8,026 1

Seq Scan on user_profile_advisoraccount (cost=0.00..150,205.45 rows=7,990 width=536) (actual time=0.085..8,726.393 rows=8,026 loops=1)

5.          

SubPlan (forSeq Scan)

6. 56.182 8,475.456 ↑ 1.0 1 8,026

Limit (cost=0.43..2.19 rows=1 width=12) (actual time=1.052..1.056 rows=1 loops=8,026)

7. 3,098.036 8,419.274 ↑ 614.0 1 8,026

GroupAggregate (cost=0.43..1,078.33 rows=614 width=12) (actual time=1.048..1.049 rows=1 loops=8,026)

  • Group Key: u0.owner_id
8. 5,321.238 5,321.238 ↑ 3.0 231 8,026

Index Scan using contact_contact_5e7b1936 on contact_contact u0 (cost=0.43..1,068.71 rows=696 width=4) (actual time=0.031..0.663 rows=231 loops=8,026)

  • Index Cond: (owner_id = user_profile_advisoraccount.user_id)
  • Filter: ((NOT inactive) AND ((source)::text <> 'I'::text))
  • Rows Removed by Filter: 67
9. 40.130 88.286 ↓ 0.0 0 8,026

Limit (cost=0.28..8.30 rows=1 width=8) (actual time=0.009..0.011 rows=0 loops=8,026)

10. 48.156 48.156 ↓ 0.0 0 8,026

Index Scan using djstripe_customer_subscriber_id_livemode_962f4a46_uniq on djstripe_customer u0_1 (cost=0.28..8.30 rows=1 width=8) (actual time=0.005..0.006 rows=0 loops=8,026)

  • Index Cond: (subscriber_id = user_profile_advisoraccount.user_id)
11. 40.130 72.234 ↓ 0.0 0 8,026

Limit (cost=0.28..8.30 rows=1 width=19) (actual time=0.007..0.009 rows=0 loops=8,026)

12. 32.104 32.104 ↓ 0.0 0 8,026

Index Scan using djstripe_customer_subscriber_id_livemode_962f4a46_uniq on djstripe_customer u0_2 (cost=0.28..8.30 rows=1 width=19) (actual time=0.004..0.004 rows=0 loops=8,026)

  • Index Cond: (subscriber_id = user_profile_advisoraccount.user_id)
Planning time : 6.718 ms
Execution time : 8,793.097 ms