explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GAI3

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 28,683.784 ↑ 1.0 1 1

Finalize Aggregate (cost=286,031.66..286,031.67 rows=1 width=8) (actual time=28,683.784..28,683.784 rows=1 loops=1)

2. 5.797 28,687.611 ↑ 2.0 1 1

Gather (cost=286,031.44..286,031.65 rows=2 width=8) (actual time=28,683.778..28,687.611 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
3. 78.272 28,681.814 ↑ 1.0 1 1

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

4. 2,529.426 28,603.542 ↑ 2.8 105,159 1

Nested Loop Anti Join (cost=0.98..284,294.05 rows=294,959 width=0) (actual time=23,356.610..28,603.542 rows=105,159 loops=1)

5. 1,028.244 1,028.244 ↓ 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.033..1,028.244 rows=1,043,578 loops=1)

  • Index Cond: (company_id = '\x4c2118ad54397f271b000000'::bytea)
  • Heap Fetches: 70
6. 25,045.872 25,045.872 ↑ 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.024..0.024 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.487 ms
Execution time : 28,687.699 ms