explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bIOKu

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 946.612 ↓ 3.7 11 1

Sort (cost=123,096.76..123,096.77 rows=3 width=46) (actual time=946.611..946.612 rows=11 loops=1)

  • Sort Key: t00_diccionario.t00_codigo
  • Sort Method: quicksort Memory: 25kB
2. 0.027 946.598 ↓ 3.7 11 1

Hash Left Join (cost=123,096.59..123,096.74 rows=3 width=46) (actual time=946.582..946.598 rows=11 loops=1)

  • Hash Cond: ((t00_diccionario.t00_codigo)::double precision = (date_part('hour'::text, a_2.gc02_inicio)))
3. 0.008 299.042 ↓ 3.7 11 1

Merge Left Join (cost=89,311.10..89,311.21 rows=3 width=38) (actual time=299.031..299.042 rows=11 loops=1)

  • Merge Cond: ((t00_diccionario.t00_codigo)::double precision = (date_part('hour'::text, a_1.gc02_inicio)))
4. 0.005 242.177 ↓ 3.7 11 1

Merge Left Join (cost=49,603.17..49,603.24 rows=3 width=30) (actual time=242.170..242.177 rows=11 loops=1)

  • Merge Cond: ((t00_diccionario.t00_codigo)::double precision = (date_part('hour'::text, a.gc02_inicio)))
5. 0.006 182.499 ↓ 3.7 11 1

Merge Left Join (cost=9,895.23..9,895.28 rows=3 width=22) (actual time=182.494..182.499 rows=11 loops=1)

  • Merge Cond: (((t00_diccionario.t00_codigo)::double precision) = (date_part('hour'::text, gc07_solicitud.gc07_fecha)))
6. 0.008 0.024 ↓ 3.7 11 1

Sort (cost=2.70..2.71 rows=3 width=14) (actual time=0.023..0.024 rows=11 loops=1)

  • Sort Key: ((t00_diccionario.t00_codigo)::double precision)
  • Sort Method: quicksort Memory: 25kB
7. 0.016 0.016 ↓ 3.7 11 1

Seq Scan on t00_diccionario (cost=0.00..2.68 rows=3 width=14) (actual time=0.010..0.016 rows=11 loops=1)

  • Filter: ((t00_codigo >= 9) AND (t00_codigo <= 19) AND ((t00_zona)::text = 'horario'::text))
  • Rows Removed by Filter: 85
8. 0.007 182.469 ↓ 2.0 2 1

Sort (cost=9,892.53..9,892.54 rows=1 width=16) (actual time=182.469..182.469 rows=2 loops=1)

  • Sort Key: (date_part('hour'::text, gc07_solicitud.gc07_fecha))
  • Sort Method: quicksort Memory: 25kB
9. 0.015 182.462 ↓ 2.0 2 1

HashAggregate (cost=9,892.50..9,892.51 rows=1 width=8) (actual time=182.462..182.462 rows=2 loops=1)

  • Group Key: date_part('hour'::text, gc07_solicitud.gc07_fecha)
10. 182.447 182.447 ↓ 56.0 56 1

Seq Scan on gc07_solicitud (cost=0.00..9,892.49 rows=1 width=8) (actual time=182.406..182.447 rows=56 loops=1)

  • Filter: ((gc07_fecha <= now()) AND (gc07_fecha >= ('now'::cstring)::date))
  • Rows Removed by Filter: 196424
11. 0.012 59.673 ↓ 2.0 2 1

Sort (cost=39,707.93..39,707.94 rows=1 width=16) (actual time=59.673..59.673 rows=2 loops=1)

  • Sort Key: (date_part('hour'::text, a.gc02_inicio))
  • Sort Method: quicksort Memory: 25kB
12. 0.087 59.661 ↓ 2.0 2 1

HashAggregate (cost=39,707.90..39,707.91 rows=1 width=16) (actual time=59.661..59.661 rows=2 loops=1)

  • Group Key: date_part('hour'::text, a.gc02_inicio)
13. 59.574 59.574 ↓ 35.0 35 1

Index Scan using pk_gc02_log_estado on gc02_log_estado a (cost=0.43..39,707.86 rows=1 width=16) (actual time=14.989..59.574 rows=35 loops=1)

  • Index Cond: ((gc02_inicio >= ('now'::cstring)::date) AND (gc02_inicio <= now()))
  • Filter: ((gc02_estado = 4) AND ((((((date_part('hour'::text, gc02_termino) - date_part('hour'::text, gc02_inicio)) * 3600::double precision) + ((date_part('minute'::text, gc02_termino) - date_part('minute'::text, gc02_ (...)
  • Rows Removed by Filter: 213
14. 0.014 56.857 ↓ 2.0 2 1

Sort (cost=39,707.93..39,707.94 rows=1 width=16) (actual time=56.856..56.857 rows=2 loops=1)

  • Sort Key: (date_part('hour'::text, a_1.gc02_inicio))
  • Sort Method: quicksort Memory: 25kB
15. 0.085 56.843 ↓ 2.0 2 1

HashAggregate (cost=39,707.90..39,707.91 rows=1 width=16) (actual time=56.843..56.843 rows=2 loops=1)

  • Group Key: date_part('hour'::text, a_1.gc02_inicio)
16. 56.758 56.758 ↓ 36.0 36 1

Index Scan using pk_gc02_log_estado on gc02_log_estado a_1 (cost=0.43..39,707.86 rows=1 width=16) (actual time=16.669..56.758 rows=36 loops=1)

  • Index Cond: ((gc02_inicio >= ('now'::cstring)::date) AND (gc02_inicio <= now()))
  • Filter: ((gc02_estado = 2) AND ((((((date_part('hour'::text, gc02_termino) - date_part('hour'::text, gc02_inicio)) * 3600::double precision) + ((date_part('minute'::text, gc02_termino) - date_part('minute'::text, gc02_inicio (...)
  • Rows Removed by Filter: 212
17. 0.005 647.529 ↓ 2.0 2 1

Hash (cost=33,785.48..33,785.48 rows=1 width=16) (actual time=647.529..647.529 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
18. 0.021 647.524 ↓ 2.0 2 1

HashAggregate (cost=33,785.46..33,785.47 rows=1 width=8) (actual time=647.523..647.524 rows=2 loops=1)

  • Group Key: date_part('hour'::text, a_2.gc02_inicio)
19. 647.503 647.503 ↓ 50.0 50 1

Seq Scan on gc02_log_estado a_2 (cost=0.00..33,785.45 rows=1 width=8) (actual time=281.177..647.503 rows=50 loops=1)

  • Filter: ((gc02_estado = 3) AND (gc02_inicio <= now()) AND (gc02_inicio >= ('now'::cstring)::date))
  • Rows Removed by Filter: 997332
Planning time : 0.749 ms
Execution time : 946.798 ms