explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lefl

Settings
# exclusive inclusive rows x rows loops node
1. 373.549 2,834.721 ↑ 1.0 1 1

Aggregate (cost=26,003.47..26,003.48 rows=1 width=8) (actual time=2,834.721..2,834.721 rows=1 loops=1)

2. 589.569 2,461.172 ↓ 1,043,455.0 1,043,455 1

Gather (cost=2,489.57..26,003.47 rows=1 width=0) (actual time=275.172..2,461.172 rows=1,043,455 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 722.369 1,871.603 ↓ 1,043,455.0 1,043,455 1

Merge Left Join (cost=1,489.57..25,003.37 rows=1 width=0) (actual time=1.102..1,871.603 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,148.198 1,148.198 ↓ 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.081..1,148.198 rows=1,043,578 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 70
5. 0.250 1.036 ↑ 9.0 123 1

Sort (cost=1,489.15..1,491.93 rows=1,112 width=47) (actual time=1.016..1.036 rows=123 loops=1)

  • Sort Key: contacts_tags_associations.contact_id
  • Sort Method: quicksort Memory: 34kB
6. 0.029 0.786 ↑ 9.0 123 1

Nested Loop (cost=0.84..1,432.89 rows=1,112 width=47) (actual time=0.683..0.786 rows=123 loops=1)

7. 0.081 0.081 ↑ 1.0 1 1

Index Scan using ix_contacts_tags_company_id_tag on contacts_tags (cost=0.28..2.50 rows=1 width=47) (actual time=0.080..0.081 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag = '00_bulk_131'::text))
8. 0.676 0.676 ↑ 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,402.83 rows=2,756 width=39) (actual time=0.597..0.676 rows=123 loops=1)

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