explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fp53 : advisoraccount

Settings
# exclusive inclusive rows x rows loops node
1. 11.321 10,866.979 ↑ 1.0 1 1

Aggregate (cost=305,350.16..305,350.17 rows=1 width=8) (actual time=10,866.977..10,866.979 rows=1 loops=1)

2. 23.937 10,855.658 ↑ 1.0 8,027 1

Group (cost=152,912.42..305,248.84 rows=8,106 width=536) (actual time=10,818.645..10,855.658 rows=8,027 loops=1)

  • Group Key: user_profile_advisoraccount.id, ((SubPlan 1)), ((SubPlan 2)), ((SubPlan 3))
3. 33.799 10,831.721 ↑ 1.0 8,027 1

Sort (cost=152,912.42..152,932.69 rows=8,106 width=536) (actual time=10,818.639..10,831.721 rows=8,027 loops=1)

  • Sort Key: user_profile_advisoraccount.id, ((SubPlan 1)), ((SubPlan 2)), ((SubPlan 3))
  • Sort Method: quicksort Memory: 654kB
4. 81.877 10,797.922 ↑ 1.0 8,027 1

Seq Scan on user_profile_advisoraccount (cost=0.00..152,386.15 rows=8,106 width=536) (actual time=7.856..10,797.922 rows=8,027 loops=1)

5.          

SubPlan (forSeq Scan)

6. 56.189 10,515.370 ↑ 1.0 1 8,027

Limit (cost=0.43..2.19 rows=1 width=12) (actual time=1.306..1.310 rows=1 loops=8,027)

7. 3,162.638 10,459.181 ↑ 614.0 1 8,027

GroupAggregate (cost=0.43..1,078.33 rows=614 width=12) (actual time=1.302..1.303 rows=1 loops=8,027)

  • Group Key: u0.owner_id
8. 7,296.543 7,296.543 ↑ 3.0 231 8,027

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

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

Limit (cost=0.28..8.30 rows=1 width=8) (actual time=0.014..0.016 rows=0 loops=8,027)

10. 88.297 88.297 ↓ 0.0 0 8,027

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.010..0.011 rows=0 loops=8,027)

  • Index Cond: (subscriber_id = user_profile_advisoraccount.user_id)
11. 40.135 72.243 ↓ 0.0 0 8,027

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

12. 32.108 32.108 ↓ 0.0 0 8,027

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,027)

  • Index Cond: (subscriber_id = user_profile_advisoraccount.user_id)
Planning time : 0.582 ms
Execution time : 10,867.141 ms