explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cq1d : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #xgHE - adds index on vendor_member.member_id; plan #WjD7; plan #Up22; plan #DYvS; plan #Uxnd; plan #bt9D

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 40.195 2,885.068 ↑ 226.0 1 1

Gather (cost=1,007.26..24,308.55 rows=226 width=4) (actual time=2,861.097..2,885.068 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.002 2,844.873 ↓ 0.0 0 3 / 3

Nested Loop Left Join (cost=7.26..23,285.95 rows=94 width=4) (actual time=2,312.578..2,844.873 rows=0 loops=3)

3. 0.071 2,844.831 ↓ 0.0 0 3 / 3

Hash Join (cost=6.84..23,168.96 rows=94 width=4) (actual time=2,312.536..2,844.831 rows=0 loops=3)

  • Hash Cond: (employer.tenant_id = tenant.tenant_id)
4. 0.004 2,844.686 ↓ 0.0 0 3 / 3

Nested Loop (cost=0.71..23,162.57 rows=94 width=8) (actual time=2,312.392..2,844.686 rows=0 loops=3)

5. 2,844.670 2,844.670 ↓ 0.0 0 3 / 3

Parallel Index Scan using member_employer_id on member (cost=0.42..23,084.45 rows=103 width=8) (actual time=2,312.376..2,844.670 rows=0 loops=3)

  • Filter: ((deleted IS FALSE) AND (archived IS FALSE) AND (((email)::text ~~* '%Elizabeth Aaron%'::text) OR (concat(first_name, ' ', last_name) ~~* '%Elizabeth Aaron%'::text) OR ((first_name)::text ~~* '%Elizabeth Aaron%'::text) OR ((last_name)::text ~~* '%Elizabeth Aaron%'::text) OR (((first_name)::text ~~* '%Elizabeth%'::text) AND ((last_name)::text ~~* '%Aaron%'::text))))
  • Rows Removed by Filter: 280,909
6. 0.012 0.012 ↑ 1.0 1 1 / 3

Index Scan using employer_pkey on employer (cost=0.29..0.76 rows=1 width=8) (actual time=0.036..0.036 rows=1 loops=1)

  • Index Cond: (employer_id = member.employer_id)
  • Filter: (archived IS FALSE)
7. 0.012 0.074 ↑ 1.0 108 1 / 3

Hash (cost=4.78..4.78 rows=108 width=4) (actual time=0.221..0.221 rows=108 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
8. 0.061 0.061 ↑ 1.0 108 1 / 3

Index Only Scan using uq_tenant_tenant_id_wex_key on tenant (cost=0.14..4.78 rows=108 width=4) (actual time=0.081..0.184 rows=108 loops=1)

  • Heap Fetches: 108
9. 0.040 0.040 ↓ 0.0 0 1 / 3

Index Only Scan using vendor_member__member_id on vendor_member (cost=0.42..1.23 rows=1 width=4) (actual time=0.119..0.119 rows=0 loops=1)

  • Index Cond: (member_id = member.id)
  • Heap Fetches: 0
Planning time : 1.520 ms
Execution time : 2,885.138 ms