explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f5NF : IS NOT COUNT

Settings
# exclusive inclusive rows x rows loops node
1. 62.289 766.628 ↑ 1.0 1 1

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

2. 537.789 704.339 ↓ 1,043,455.0 1,043,455 1

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

  • Workers Planned: 2
  • Workers Launched: 2
3. 76.082 166.550 ↓ 347,818.0 347,818 3 / 3

Merge Left Join (cost=1,488.42..25,027.22 rows=1 width=0) (actual time=0.818..166.550 rows=347,818 loops=3)

  • 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: 41
4. 89.800 89.800 ↑ 1.2 347,859 3 / 3

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.155..89.800 rows=347,859 loops=3)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 1,398
5. 0.153 0.668 ↑ 8.8 123 3 / 3

Sort (cost=1,487.99..1,490.70 rows=1,083 width=47) (actual time=0.655..0.668 rows=123 loops=3)

  • Sort Key: contacts_tags_associations.contact_id
  • Sort Method: quicksort Memory: 34kB
6. 0.100 0.515 ↑ 8.8 123 3 / 3

Nested Loop (cost=0.84..1,433.41 rows=1,083 width=47) (actual time=0.439..0.515 rows=123 loops=3)

7. 0.211 0.211 ↑ 1.0 1 3 / 3

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.210..0.211 rows=1 loops=3)

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

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.146..0.204 rows=123 loops=3)

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