explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TUD6

Settings
# exclusive inclusive rows x rows loops node
1. 0.114 0.313 ↓ 38.0 38 1

Sort (cost=82.40..82.40 rows=1 width=172) (actual time=0.307..0.313 rows=38 loops=1)

  • Sort Key: m.apepat_med, m.apemat_med, m.nom_med
  • Sort Method: quicksort Memory: 28kB
2.          

CTE hmp

3. 0.004 0.094 ↑ 2.0 2 1

Subquery Scan on x (cost=55.27..80.62 rows=4 width=76) (actual time=0.080..0.094 rows=2 loops=1)

  • Filter: (x.row_number = 1)
  • Rows Removed by Filter: 5
4. 0.018 0.090 ↑ 111.4 7 1

WindowAgg (cost=55.27..70.87 rows=780 width=84) (actual time=0.078..0.090 rows=7 loops=1)

5. 0.059 0.072 ↑ 111.4 7 1

Sort (cost=55.27..57.22 rows=780 width=76) (actual time=0.070..0.072 rows=7 loops=1)

  • Sort Key: h_medico_plantilla.rut_med, h_medico_plantilla.fecha DESC
  • Sort Method: quicksort Memory: 25kB
6. 0.013 0.013 ↑ 111.4 7 1

Seq Scan on h_medico_plantilla (cost=0.00..17.80 rows=780 width=76) (actual time=0.011..0.013 rows=7 loops=1)

7. 0.045 0.199 ↓ 38.0 38 1

Nested Loop Left Join (cost=0.00..1.77 rows=1 width=172) (actual time=0.124..0.199 rows=38 loops=1)

  • Join Filter: (m.rut_med = hmp.rut_med)
  • Rows Removed by Join Filter: 74
8. 0.040 0.040 ↓ 38.0 38 1

Seq Scan on medico m (cost=0.00..1.64 rows=1 width=128) (actual time=0.019..0.040 rows=38 loops=1)

  • Filter: (est_med = '1'::numeric)
  • Rows Removed by Filter: 14
9. 0.114 0.114 ↑ 2.0 2 38

CTE Scan on hmp (cost=0.00..0.08 rows=4 width=76) (actual time=0.002..0.003 rows=2 loops=38)

Planning time : 0.974 ms
Execution time : 0.434 ms