explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SKhy

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 34,779.665 ↓ 0.0 0 1

Limit (cost=1,693,078.92..1,693,078.94 rows=10 width=20) (actual time=34,779.665..34,779.665 rows=0 loops=1)

2. 0.006 34,779.664 ↓ 0.0 0 1

Sort (cost=1,693,078.92..1,693,080.99 rows=830 width=20) (actual time=34,779.664..34,779.664 rows=0 loops=1)

  • Sort Key: (COALESCE(CASE WHEN ((original_mr_no)::text = ''::text) THEN NULL::character varying ELSE original_mr_no END, mr_no))
  • Sort Method: quicksort Memory: 25kB
3. 0.004 34,779.658 ↓ 0.0 0 1

HashAggregate (cost=1,693,050.60..1,693,060.98 rows=830 width=20) (actual time=34,779.658..34,779.658 rows=0 loops=1)

4. 34,779.654 34,779.654 ↓ 0.0 0 1

Seq Scan on patient_details pd (cost=0.00..1,693,046.45 rows=830 width=20) (actual time=34,779.654..34,779.654 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