explain.depesz.com

PostgreSQL's explain analyze made readable

Result: okI

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 37,196.757 ↑ 1.0 1 1

Finalize Aggregate (cost=286,031.66..286,031.67 rows=1 width=8) (actual time=37,196.756..37,196.757 rows=1 loops=1)

2. 54.890 37,208.966 ↑ 2.0 1 1

Gather (cost=286,031.44..286,031.65 rows=2 width=8) (actual time=37,196.751..37,208.966 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 64.571 37,154.076 ↑ 1.0 1 1

Partial Aggregate (cost=285,031.44..285,031.45 rows=1 width=8) (actual time=37,154.076..37,154.076 rows=1 loops=1)

4. 3,343.034 37,089.505 ↑ 2.8 105,159 1

Nested Loop Anti Join (cost=0.98..284,294.05 rows=294,959 width=0) (actual time=32,418.655..37,089.505 rows=105,159 loops=1)

5. 2,439.131 2,439.131 ↓ 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.046..2,439.131 rows=1,043,578 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 70
6. 31,307.340 31,307.340 ↑ 10.0 1 1,043,578

Index Only Scan using contacts_tags_associations_pkey on contacts_tags_associations (cost=0.56..0.87 rows=10 width=26) (actual time=0.030..0.030 rows=1 loops=1,043,578)

  • Index Cond: ((company_id = contacts.company_id) AND (company_id = '\x4c2118ad54397f271b000000'::bytea) AND (contact_id = contacts.id))
  • Heap Fetches: 938,419
Planning time : 0.663 ms
Execution time : 37,209.136 ms