explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9OD3

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 122,731.644 ↑ 1.0 1 1

Finalize Aggregate (cost=207,139.32..207,139.33 rows=1 width=8) (actual time=122,731.644..122,731.644 rows=1 loops=1)

2. 723.055 123,452.688 ↑ 2.0 1 1

Gather (cost=207,139.10..207,139.31 rows=2 width=8) (actual time=122,731.640..123,452.688 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 1,044.146 122,729.633 ↑ 1.0 1 1

Partial Aggregate (cost=206,139.10..206,139.11 rows=1 width=8) (actual time=122,729.633..122,729.633 rows=1 loops=1)

4. 2,574.767 121,685.487 ↓ 3.0 4,260,676 1

Merge Join (cost=16.58..202,595.35 rows=1,417,502 width=0) (actual time=0.770..121,685.487 rows=4,260,676 loops=1)

  • Merge Cond: (contacts_tags_associations_1.contact_id = contacts.id)
5. 109,646.476 109,646.476 ↓ 2.4 4,260,676 1

Parallel Index Only Scan using contacts_tags_associations_pkey on contacts_tags_associations contacts_tags_associations_1 (cost=0.56..152,888.47 rows=1,775,354 width=26) (actual time=0.574..109,646.476 rows=4,260,676 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_id IS NOT NULL))
  • Heap Fetches: 4,260,676
6. 9,464.244 9,464.244 ↓ 1.0 1,043,574 1

Index Only Scan using ix_company_id_id on contacts (cost=0.43..28,500.75 rows=1,042,564 width=26) (actual time=0.184..9,464.244 rows=1,043,574 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 148
Planning time : 7.624 ms
Execution time : 123,452.923 ms