explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hPn8 : Optimization for: Optimization for: plan #SKhy; plan #PirI

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 38,125.992 ↓ 0.0 0 1

Limit (cost=0.43..23,885.30 rows=10 width=20) (actual time=38,125.992..38,125.992 rows=0 loops=1)

2. 0.001 38,125.990 ↓ 0.0 0 1

GroupAggregate (cost=0.43..2,094,703.53 rows=877 width=20) (actual time=38,125.990..38,125.990 rows=0 loops=1)

3. 38,125.989 38,125.989 ↓ 0.0 0 1

Index Scan Backward using patient_details_mr_no_original_mr_no_coalesce_idx on patient_details pd (cost=0.43..2,094,688.18 rows=877 width=20) (actual time=38,125.989..38,125.989 rows=0 loops=1)

  • Filter: (((reverse(mr_no))::text ~~ '%RSMC00206421%'::text) OR (lower((government_identifier)::text) ~~ '%RSMC00206421%'::text) OR ((reverse(COALESCE(oldmrno, ''::character varying)))::text ~~ '%RSMC00206421%'::text) OR ((reverse(COALESCE(original_mr_no, ''::character varying)))::text ~~ '%RSMC00206421%'::text))
  • Rows Removed by Filter: 2,192,341
Total runtime : 38,126.030 ms