explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fR75

Settings
# exclusive inclusive rows x rows loops node
1. 0.065 4.258 ↓ 1,000.0 1,000 1

Limit (cost=2,489.57..26,003.47 rows=1 width=17) (actual time=2.918..4.258 rows=1,000 loops=1)

2. 3.261 4.193 ↓ 1,000.0 1,000 1

Gather (cost=2,489.57..26,003.47 rows=1 width=17) (actual time=2.917..4.193 rows=1,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 0.233 0.932 ↓ 1,000.0 1,000 1

Merge Left Join (cost=1,489.57..25,003.37 rows=1 width=17) (actual time=0.381..0.932 rows=1,000 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)
4. 0.373 0.373 ↑ 434.4 1,000 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.050..0.373 rows=1,000 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 0
5. 0.097 0.326 ↑ 1,112.0 1 1

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

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

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

7. 0.048 0.048 ↑ 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.046..0.048 rows=1 loops=1)

  • Index Cond: ((company_id = '\x4c2118ad54397f271b000000'::bytea) AND (tag = '00_bulk_131'::text))
8. 0.155 0.155 ↑ 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.074..0.155 rows=123 loops=1)

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