explain.depesz.com

PostgreSQL's explain analyze made readable

Result: z2Ds

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.089 ↓ 3.0 3 1

Limit (cost=16.39..16.48 rows=1 width=1,712) (actual time=0.084..0.089 rows=3 loops=1)

2. 0.010 0.088 ↓ 3.0 3 1

Result (cost=16.39..16.48 rows=1 width=1,712) (actual time=0.083..0.088 rows=3 loops=1)

3. 0.016 0.078 ↓ 3.0 3 1

Sort (cost=16.39..16.39 rows=1 width=1,990) (actual time=0.078..0.078 rows=3 loops=1)

  • Sort Key: patients.last_name
  • Sort Method: quicksort Memory: 29kB
4. 0.039 0.062 ↓ 3.0 3 1

Nested Loop Left Join (cost=0.00..16.38 rows=1 width=1,990) (actual time=0.033..0.062 rows=3 loops=1)

  • Join Filter: (patients.id = patient_alt_names.patient_id)
  • Filter: (((patients.last_name)::text ~~* 't%'::text) OR (patient_alt_names.last_name ~~* 't%'::text))
  • Rows Removed by Filter: 3
5. 0.017 0.017 ↓ 6.0 6 1

Seq Scan on patients (cost=0.00..2.08 rows=1 width=1,954) (actual time=0.013..0.017 rows=6 loops=1)

  • Filter: ((NOT has_deleted) AND (company_id = 1))
6. 0.006 0.006 ↓ 0.0 0 6

Seq Scan on patient_alt_names (cost=0.00..14.25 rows=2 width=40) (actual time=0.001..0.001 rows=0 loops=6)

  • Filter: (name_type = 'alias'::text)