explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TF1X

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 50.607 ↑ 1.0 1 1

Aggregate (cost=5,160.19..5,160.20 rows=1 width=8) (actual time=50.606..50.607 rows=1 loops=1)

2. 0.008 50.598 ↑ 14.0 1 1

Append (cost=0.00..5,160.16 rows=14 width=10) (actual time=49.927..50.598 rows=1 loops=1)

3. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on cexterna (cost=0.00..0.00 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((fecha_cita = '2019-01-05'::date) AND (codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (co
4. 0.027 0.027 ↓ 0.0 0 1

Index Scan using cexterna_2008_codigo_jor on cexterna_2008 (cost=0.42..2.17 rows=1 width=9) (actual time=0.027..0.027 rows=0 loops=1)

  • Index Cond: (codigo_jor = '21'::numeric)
  • Filter: ((fecha_cita = '2019-01-05'::date) AND (codigo_med = '291999233'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric) AND (con
5. 0.043 3.769 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2009 (cost=142.32..153.60 rows=1 width=9) (actual time=3.769..3.769 rows=0 loops=1)

  • Recheck Cond: ((consul_pga = '301'::numeric) AND (fecha_cita = '2019-01-05'::date))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
6. 0.292 3.726 ↓ 0.0 0 1

BitmapAnd (cost=142.32..142.32 rows=11 width=0) (actual time=3.726..3.726 rows=0 loops=1)

7. 3.409 3.409 ↓ 2.2 12,321 1

Bitmap Index Scan on cexterna_2009_consul_pga (cost=0.00..58.77 rows=5,645 width=0) (actual time=3.409..3.409 rows=12,321 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
8. 0.025 0.025 ↑ 8,116.0 1 1

Bitmap Index Scan on cexterna_2009_fecha_cita (cost=0.00..83.30 rows=8,116 width=0) (actual time=0.025..0.025 rows=1 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
9. 0.004 0.026 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2010 (cost=411.35..460.55 rows=1 width=8) (actual time=0.026..0.026 rows=0 loops=1)

  • Recheck Cond: ((fecha_cita = '2019-01-05'::date) AND (codigo_med = '291999233'::numeric))
  • Filter: ((codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric) AND (consul_pga = '301'::numeric))
10. 0.000 0.022 ↓ 0.0 0 1

BitmapAnd (cost=411.35..411.35 rows=48 width=0) (actual time=0.022..0.022 rows=0 loops=1)

11. 0.022 0.022 ↓ 0.0 0 1

Bitmap Index Scan on cexterna_2010_fecha_cita (cost=0.00..98.87 rows=9,525 width=0) (actual time=0.022..0.022 rows=0 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
12. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on cexterna_2010_codigo_med (cost=0.00..312.23 rows=27,439 width=0) (never executed)

  • Index Cond: (codigo_med = '291999233'::numeric)
13. 0.007 0.064 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2011 (cost=471.79..525.09 rows=1 width=9) (actual time=0.064..0.064 rows=0 loops=1)

  • Recheck Cond: ((fecha_cita = '2019-01-05'::date) AND (codigo_med = '291999233'::numeric))
  • Filter: ((codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric) AND (consul_pga = '301'::numeric))
14. 0.001 0.057 ↓ 0.0 0 1

BitmapAnd (cost=471.79..471.79 rows=52 width=0) (actual time=0.057..0.057 rows=0 loops=1)

15. 0.021 0.021 ↑ 10,464.0 1 1

Bitmap Index Scan on cexterna_2011_fecha_cita (cost=0.00..108.91 rows=10,464 width=0) (actual time=0.021..0.021 rows=1 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
16. 0.035 0.035 ↓ 0.0 0 1

Bitmap Index Scan on cexterna_2011_codigo_med (cost=0.00..362.63 rows=31,626 width=0) (actual time=0.035..0.035 rows=0 loops=1)

  • Index Cond: (codigo_med = '291999233'::numeric)
17. 0.002 15.263 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2012 (cost=530.48..597.10 rows=1 width=8) (actual time=15.263..15.263 rows=0 loops=1)

  • Recheck Cond: ((fecha_cita = '2019-01-05'::date) AND (consul_pga = '301'::numeric))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
18. 0.004 15.261 ↓ 0.0 0 1

BitmapAnd (cost=530.48..530.48 rows=65 width=0) (actual time=15.261..15.261 rows=0 loops=1)

19. 0.025 0.025 ↑ 4,083.3 3 1

Bitmap Index Scan on cexterna_2012_fecha_cita (cost=0.00..127.31 rows=12,250 width=0) (actual time=0.025..0.025 rows=3 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
20. 15.232 15.232 ↓ 1.1 42,312 1

Bitmap Index Scan on cexterna_2012_consul_pga (cost=0.00..402.92 rows=38,865 width=0) (actual time=15.232..15.232 rows=42,312 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
21. 0.036 2.569 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2013 (cost=178.52..183.65 rows=1 width=8) (actual time=2.569..2.569 rows=0 loops=1)

  • Recheck Cond: ((consul_pga = '301'::numeric) AND (fecha_cita = '2019-01-05'::date))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
22. 0.258 2.533 ↓ 0.0 0 1

BitmapAnd (cost=178.52..178.52 rows=5 width=0) (actual time=2.533..2.533 rows=0 loops=1)

23. 2.252 2.252 ↓ 4.2 13,354 1

Bitmap Index Scan on cexterna_2013_consul_pga (cost=0.00..34.54 rows=3,214 width=0) (actual time=2.252..2.252 rows=13,354 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
24. 0.023 0.023 ↓ 0.0 0 1

Bitmap Index Scan on cexterna_2013_fecha_cita (cost=0.00..143.73 rows=13,773 width=0) (actual time=0.023..0.023 rows=0 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
25. 0.003 11.094 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2014 (cost=637.17..707.89 rows=1 width=8) (actual time=11.094..11.094 rows=0 loops=1)

  • Recheck Cond: ((fecha_cita = '2019-01-05'::date) AND (consul_pga = '301'::numeric))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
26. 0.004 11.091 ↓ 0.0 0 1

BitmapAnd (cost=637.17..637.17 rows=69 width=0) (actual time=11.091..11.091 rows=0 loops=1)

27. 0.025 0.025 ↑ 7,863.0 2 1

Bitmap Index Scan on cexterna_2014_fecha_cita (cost=0.00..163.38 rows=15,726 width=0) (actual time=0.025..0.025 rows=2 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
28. 11.062 11.062 ↑ 1.1 41,567 1

Bitmap Index Scan on cexterna_2014_consul_pga (cost=0.00..473.53 rows=45,880 width=0) (actual time=11.062..11.062 rows=41,567 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
29. 0.063 5.322 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2015 (cost=239.22..245.37 rows=1 width=8) (actual time=5.322..5.322 rows=0 loops=1)

  • Recheck Cond: ((consul_pga = '301'::numeric) AND (fecha_cita = '2019-01-05'::date))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
30. 0.737 5.259 ↓ 0.0 0 1

BitmapAnd (cost=239.22..239.22 rows=6 width=0) (actual time=5.259..5.259 rows=0 loops=1)

31. 4.483 4.483 ↓ 7.7 28,817 1

Bitmap Index Scan on cexterna_2015_consul_pga (cost=0.00..39.65 rows=3,762 width=0) (actual time=4.483..4.483 rows=28,817 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
32. 0.039 0.039 ↑ 3,863.6 5 1

Bitmap Index Scan on cexterna_2015_fecha_cita (cost=0.00..199.32 rows=19,318 width=0) (actual time=0.039..0.039 rows=5 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
33. 0.066 6.935 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2016 (cost=308.47..314.62 rows=1 width=8) (actual time=6.935..6.935 rows=0 loops=1)

  • Recheck Cond: ((consul_pga = '301'::numeric) AND (fecha_cita = '2019-01-05'::date))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
34. 0.720 6.869 ↓ 0.0 0 1

BitmapAnd (cost=308.47..308.47 rows=6 width=0) (actual time=6.869..6.869 rows=0 loops=1)

35. 6.115 6.115 ↓ 7.2 28,711 1

Bitmap Index Scan on cexterna_2016_consul_pga (cost=0.00..42.53 rows=4,013 width=0) (actual time=6.115..6.115 rows=28,711 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
36. 0.034 0.034 ↑ 8,544.7 3 1

Bitmap Index Scan on cexterna_2016_fecha_cita (cost=0.00..265.69 rows=25,634 width=0) (actual time=0.034..0.034 rows=3 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
37. 0.001 0.062 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2017 (cost=1,345.86..1,500.64 rows=1 width=8) (actual time=0.062..0.062 rows=0 loops=1)

  • Recheck Cond: ((fecha_cita = '2019-01-05'::date) AND (codigo_med = '291999233'::numeric))
  • Filter: ((codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric) AND (consul_pga = '301'::numeric))
38. 0.002 0.061 ↓ 0.0 0 1

BitmapAnd (cost=1,345.86..1,345.86 rows=151 width=0) (actual time=0.061..0.061 rows=0 loops=1)

39. 0.025 0.025 ↑ 2,325.5 13 1

Bitmap Index Scan on cexterna_2017_fecha_cita (cost=0.00..312.18 rows=30,232 width=0) (actual time=0.025..0.025 rows=13 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
40. 0.034 0.034 ↓ 0.0 0 1

Bitmap Index Scan on cexterna_2017_codigo_med (cost=0.00..1,033.43 rows=90,383 width=0) (actual time=0.034..0.034 rows=0 loops=1)

  • Index Cond: (codigo_med = '291999233'::numeric)
41. 0.029 1.902 ↓ 0.0 0 1

Bitmap Heap Scan on cexterna_2018 (cost=436.63..442.78 rows=1 width=9) (actual time=1.902..1.902 rows=0 loops=1)

  • Recheck Cond: ((codigo_med = '291999233'::numeric) AND (fecha_cita = '2019-01-05'::date))
  • Filter: ((codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric) AND (consul_pga = '301'::numeric))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=1
42. 0.160 1.873 ↓ 0.0 0 1

BitmapAnd (cost=436.63..436.63 rows=6 width=0) (actual time=1.873..1.873 rows=0 loops=1)

43. 0.540 0.540 ↑ 1.7 1,828 1

Bitmap Index Scan on cexterna_2018_codigo_med (cost=0.00..35.20 rows=3,018 width=0) (actual time=0.540..0.540 rows=1,828 loops=1)

  • Index Cond: (codigo_med = '291999233'::numeric)
44. 1.173 1.173 ↑ 5.4 7,258 1

Bitmap Index Scan on cexterna_2018_fecha_cita (cost=0.00..401.18 rows=39,032 width=0) (actual time=1.173..1.173 rows=7,258 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
45. 1.685 3.547 ↑ 1.0 1 1

Bitmap Heap Scan on cexterna_2019 (cost=20.43..24.53 rows=1 width=16) (actual time=2.884..3.547 rows=1 loops=1)

  • Recheck Cond: ((fecha_cita = '2019-01-05'::date) AND (consul_pga = '301'::numeric))
  • Filter: ((codigo_med = '291999233'::numeric) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric))
  • Rows Removed by Filter: 186
  • Heap Blocks: exact=184
46. 0.304 1.862 ↓ 0.0 0 1

BitmapAnd (cost=20.43..20.43 rows=4 width=0) (actual time=1.862..1.862 rows=0 loops=1)

47. 1.268 1.268 ↓ 15.1 11,422 1

Bitmap Index Scan on cexterna_2019_fecha_cita (cost=0.00..10.09 rows=756 width=0) (actual time=1.268..1.268 rows=11,422 loops=1)

  • Index Cond: (fecha_cita = '2019-01-05'::date)
48. 0.290 0.290 ↓ 1.8 1,393 1

Bitmap Index Scan on cexterna_2019_consul_pga (cost=0.00..10.09 rows=756 width=0) (actual time=0.290..0.290 rows=1,393 loops=1)

  • Index Cond: (consul_pga = '301'::numeric)
49. 0.008 0.008 ↓ 0.0 0 1

Index Scan using cexterna_2020_codigo_med on cexterna_2020 (cost=0.14..2.17 rows=1 width=16) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: (codigo_med = '291999233'::numeric)
  • Filter: ((fecha_cita = '2019-01-05'::date) AND (codigo_jor = '21'::numeric) AND (codigo_tur = '10'::numeric) AND (codigo_est = '8'::numeric) AND (consul_pga