explain.depesz.com

PostgreSQL's explain analyze made readable

Result: O1v

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 35,244.927 ↑ 1.0 1 1

Finalize Aggregate (cost=286,031.66..286,031.67 rows=1 width=8) (actual time=35,244.927..35,244.927 rows=1 loops=1)

2. 6.513 35,248.094 ↑ 2.0 1 1

Gather (cost=286,031.44..286,031.65 rows=2 width=8) (actual time=35,244.923..35,248.094 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 116.436 35,241.581 ↑ 1.0 1 1

Partial Aggregate (cost=285,031.44..285,031.45 rows=1 width=8) (actual time=35,241.581..35,241.581 rows=1 loops=1)

4. 2,635.290 35,125.145 ↑ 2.8 105,159 1

Nested Loop Anti Join (cost=0.98..284,294.05 rows=294,959 width=0) (actual time=29,971.580..35,125.145 rows=105,159 loops=1)

5. 1,182.515 1,182.515 ↓ 2.4 1,043,578 1

Parallel Index Only Scan using ix_company_id_id on contacts (cost=0.43..22,418.03 rows=434,402 width=26) (actual time=0.058..1,182.515 rows=1,043,578 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 70
6. 31,307.340 31,307.340 ↑ 10.0 1 1,043,578

Index Only Scan using contacts_tags_associations_pkey on contacts_tags_associations contacts_tags_associations_1 (cost=0.56..0.87 rows=10 width=26) (actual time=0.030..0.030 rows=1 loops=1,043,578)

  • Index Cond: ((company_id = contacts.company_id) AND (company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_id = contacts.id))
  • Heap Fetches: 938,419
Planning time : 0.479 ms
Execution time : 35,248.207 ms