explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pCJE : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #dLjQ; plan #Zphw; plan #zT6; plan #OUyQ; plan #yW2L

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 2,226.182 3,060.013 ↓ 63.0 63 1

Bitmap Heap Scan on system_emails se (cost=107,307.91..138,073.65 rows=1 width=68) (actual time=2,856.450..3,060.013 rows=63 loops=1)

  • Recheck Cond: ((property_id = ANY ('{218060,218061,218062,218064,218065,218066,218067,218068,218070,218071,218099,218104,218105,252494,518395,536150,570963,843826,886853,908584}'::integer[])) AND (cid = 12859))
  • Filter: ((applicant_id IS NOT NULL) AND (customer_id IS NULL) AND (company_employee_id IS NULL) AND ((sent_on)::date >= '2019-12-30'::date) AND ((sent_on)::date <= '2020-01-05'::date) AND ((system_email_type_id = 102) OR ((system_email_type_id = 62) AND (scheduled_email_id IS NOT NULL))))
  • Rows Removed by Filter: 576492
  • Heap Blocks: exact=368674
2. 46.676 833.831 ↓ 0.0 0 1

BitmapAnd (cost=107,307.91..107,307.91 rows=15,109 width=0) (actual time=833.831..833.831 rows=0 loops=1)

3. 90.667 90.667 ↑ 1.5 576,808 1

Bitmap Index Scan on idx_system_emails_property_id (cost=0.00..12,232.25 rows=878,245 width=0) (actual time=90.667..90.667 rows=576,808 loops=1)

  • Index Cond: (property_id = ANY ('{218060,218061,218062,218064,218065,218066,218067,218068,218070,218071,218099,218104,218105,252494,518395,536150,570963,843826,886853,908584}'::integer[]))
4. 696.488 696.488 ↑ 2.1 3,234,219 1

Bitmap Index Scan on idx_system_emails_cid (cost=0.00..95,075.40 rows=6,839,311 width=0) (actual time=696.488..696.488 rows=3,234,219 loops=1)

  • Index Cond: (cid = 12859)
Planning time : 0.772 ms