explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7PwE

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 1,084.393 ↑ 19.3 229 1

GroupAggregate (cost=6,586,882.12..6,586,902.02 rows=4,421 width=29) (actual time=1,084.315..1,084.393 rows=229 loops=1)

  • Group Key: accounts.id
2. 0.090 1,084.323 ↑ 19.3 229 1

Sort (cost=6,586,882.12..6,586,884.33 rows=4,421 width=21) (actual time=1,084.311..1,084.323 rows=229 loops=1)

  • Sort Key: accounts.id
  • Sort Method: quicksort Memory: 41kB
3. 51.605 1,084.233 ↑ 19.3 229 1

Index Scan using index_accounts_on_organization_id_and_sfdc_id on accounts (cost=0.11..6,586,828.58 rows=4,421 width=21) (actual time=0.074..1,084.233 rows=229 loops=1)

  • Index Cond: (organization_id = 42)
  • Filter: (((owner_sfdc_id)::text = ANY ('{0054A000009AXL4QAO,0054A000009XOFzQAO,0054A000009mf0UQAQ,0054A000009mn45QAA,0054A000009msWnQAI,0054A000009mpk8QAA,0054A0000096zqCQAQ,0054A000009kdiQQAQ,0054A0000096v1UQAQ,0054A0000097RT6QAM,0054A0000096v1FQAQ,005G0000002w15YIAQ}'::text[])) OR (alternatives: SubPlan 1 or hashed SubPlan 2) OR ((sfdc_data ->> ''::text) = ANY ('{0054A000009AXL4QAO,0054A000009XOFzQAO,0054A000009mf0UQAQ,0054A000009mn45QAA,0054A000009msWnQAI,0054A000009mpk8QAA,0054A0000096zqCQAQ,0054A000009kdiQQAQ,0054A0000096v1UQAQ,0054A0000097RT6QAM,0054A0000096v1FQAQ,005G0000002w15YIAQ}'::text[])))
4.          

SubPlan (for Index Scan)

5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.23..788.28 rows=1 width=0) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Index Scan using index_people_on_account_id on people (cost=0.11..325.28 rows=161 width=4) (never executed)

  • Index Cond: (account_id = accounts.id)
7. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_person_activities_on_person_id_and_user_id on person_activities (cost=0.11..2.87 rows=1 width=4) (never executed)

  • Index Cond: (person_id = people.id)
  • Filter: (user_id = ANY ('{48099,62359,51097,51846,52133,51848,28271,46358,9582,39628,34106,27846,1895}'::integer[]))
  • Heap Fetches: 0
8. 65.184 1,032.628 ↓ 1.2 280,409 1

Gather (cost=1,000.23..810,880.11 rows=231,170 width=4) (actual time=0.494..1,032.628 rows=280,409 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
9. 84.558 967.444 ↓ 1.0 140,204 2 / 2

Nested Loop (cost=0.23..786,763.11 rows=135,982 width=4) (actual time=0.134..967.444 rows=140,204 loops=2)

10. 250.231 250.231 ↓ 1.6 210,885 2 / 2

Parallel Index Scan using index_person_activities_on_user_id on person_activities person_activities_1 (cost=0.11..301,368.55 rows=135,982 width=4) (actual time=0.072..250.231 rows=210,885 loops=2)

  • Index Cond: (user_id = ANY ('{48099,62359,51097,51846,52133,51848,28271,46358,9582,39628,34106,27846,1895}'::integer[]))
11. 632.655 632.655 ↑ 1.0 1 421,770 / 2

Index Scan using people_pkey on people people_1 (cost=0.11..3.57 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=421,770)

  • Index Cond: (id = person_activities_1.person_id)
Planning time : 1.499 ms
Execution time : 1,098.064 ms