explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vhe : Optimization for: Lojistic; plan #gtc0

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=1,833.97..1,833.97 rows=1 width=6) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=538.59..1,833.97 rows=1 width=6) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Seq Scan on companies (cost=0.00..20.63 rows=3 width=4) (actual rows= loops=)

  • Filter: ((deleted_at IS NULL) AND enabled)
4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on refunds (cost=538.59..604.44 rows=1 width=10) (actual rows= loops=)

  • Recheck Cond: ((company_id = companies.id) AND ((state)::text = 'unresolved'::text))
  • Filter: ((deleted_at IS NULL) AND (batchable_id IS NULL) AND (refund_amount > '1'::numeric) AND ((auditor_type)::text = 'residential_charge_auditor'::text) AND ((carrier)::text = 'fedex'::text) AND ((provider)::text = 'invoice'::text))
5. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=538.59..538.59 rows=33 width=0) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_refunds_on_company_id (cost=0.00..77.97 rows=3,920 width=0) (actual rows= loops=)

  • Index Cond: (company_id = companies.id)
7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_refunds_on_state (cost=0.00..460.58 rows=17,661 width=0) (actual rows= loops=)

  • Index Cond: ((state)::text = 'unresolved'::text)