explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FZdH

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 0.208 ↑ 11.7 3 1

MixedAggregate (cost=0.52..190.11 rows=35 width=48) (actual time=0.204..0.208 rows=3 loops=1)

  • Hash Key: a.date, a.medorg_id
  • Hash Key: a.date
  • Group Key: ()
2. 0.009 0.172 ↓ 1.3 22 1

Nested Loop (cost=0.52..189.02 rows=17 width=20) (actual time=0.149..0.172 rows=22 loops=1)

3. 0.019 0.123 ↑ 10.0 1 1

Hash Join (cost=0.23..2.64 rows=10 width=4) (actual time=0.116..0.123 rows=1 loops=1)

  • Hash Cond: ((m.short_name)::text = replace(mat.mat[1], '""'::text, '"'::text))
4. 0.026 0.026 ↑ 1.0 19 1

Seq Scan on med_org m (cost=0.00..2.19 rows=19 width=79) (actual time=0.020..0.026 rows=19 loops=1)

5. 0.008 0.078 ↑ 10.0 1 1

Hash (cost=0.10..0.10 rows=10 width=32) (actual time=0.078..0.078 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.070 0.070 ↑ 10.0 1 1

Function Scan on regexp_matches mat (cost=0.00..0.10 rows=10 width=32) (actual time=0.070..0.070 rows=1 loops=1)

7. 0.040 0.040 ↓ 1.1 22 1

Index Scan using polyclinic_availability_of_ap_rank_id_date_medorg_id_filial_idx on polyclinic_availability_of_appointment_mat_master a (cost=0.29..18.44 rows=20 width=20) (actual time=0.030..0.040 rows=22 loops=1)

  • Index Cond: ((rank_id = 1) AND (date = '2019-03-05'::date) AND (medorg_id = (CASE WHEN (mat.mat[1] <> ''::text) THEN m.id ELSE NULL::integer END)))