explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x18G

Settings
# exclusive inclusive rows x rows loops node
1. 293.433 2,369.159 ↑ 1.0 1 1

Aggregate (cost=26,027.33..26,027.34 rows=1 width=8) (actual time=2,369.159..2,369.159 rows=1 loops=1)

2. 399.372 2,075.726 ↓ 1,043,455.0 1,043,455 1

Gather (cost=2,488.42..26,027.32 rows=1 width=0) (actual time=3.603..2,075.726 rows=1,043,455 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 598.069 1,676.354 ↓ 1,043,455.0 1,043,455 1

Merge Left Join (cost=1,488.42..25,027.22 rows=1 width=0) (actual time=0.392..1,676.354 rows=1,043,455 loops=1)

  • Merge Cond: (contacts.id = contacts_tags_associations.contact_id)
  • Join Filter: (contacts_tags_associations.company_id = contacts.company_id)
  • Filter: (contacts_tags.tag IS NULL)
  • Rows Removed by Filter: 123
4. 1,077.925 1,077.925 ↓ 2.4 1,043,578 1

Parallel Index Only Scan using ix_company_id_id on contacts (cost=0.43..22,442.48 rows=434,732 width=26) (actual time=0.049..1,077.925 rows=1,043,578 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 5,154
5. 0.142 0.360 ↑ 8.8 123 1

Sort (cost=1,487.99..1,490.70 rows=1,083 width=47) (actual time=0.340..0.360 rows=123 loops=1)

  • Sort Key: contacts_tags_associations.contact_id
  • Sort Method: quicksort Memory: 34kB
6. 0.026 0.218 ↑ 8.8 123 1

Nested Loop (cost=0.84..1,433.41 rows=1,083 width=47) (actual time=0.106..0.218 rows=123 loops=1)

7. 0.052 0.052 ↑ 1.0 1 1

Index Only Scan using ix_contacts_tags_company_id_tag_tag_id on contacts_tags (cost=0.28..2.50 rows=1 width=47) (actual time=0.051..0.052 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag = '00_bulk_131'::text))
  • Heap Fetches: 1
8. 0.140 0.140 ↑ 22.4 123 1

Index Only Scan using ix_contacts_tags_associations_company_id_tag_id_contact_id on contacts_tags_associations (cost=0.56..1,403.34 rows=2,757 width=39) (actual time=0.052..0.140 rows=123 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag_id = contacts_tags.id))
  • Heap Fetches: 123
Planning time : 1.176 ms
Execution time : 2,370.344 ms