explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AAZc

Settings
# exclusive inclusive rows x rows loops node
1. 14.353 4,115.245 ↓ 10.0 70 1

GroupAggregate (cost=3,027.25..3,027.39 rows=7 width=36) (actual time=4,089.233..4,115.245 rows=70 loops=1)

  • Group Key: m0301.codigo_a
2. 44.551 4,100.892 ↓ 4,930.1 34,511 1

Sort (cost=3,027.25..3,027.27 rows=7 width=10) (actual time=4,089.201..4,100.892 rows=34,511 loops=1)

  • Sort Key: m0301.codigo_a
  • Sort Method: external merge Disk: 680kB
3. 38.135 4,056.341 ↓ 4,930.1 34,511 1

Nested Loop (cost=1.41..3,027.15 rows=7 width=10) (actual time=18.618..4,056.341 rows=34,511 loops=1)

4. 32.355 3,431.264 ↓ 4,932.3 34,526 1

Nested Loop (cost=0.99..3,018.58 rows=7 width=21) (actual time=18.584..3,431.264 rows=34,526 loops=1)

5. 138.236 138.236 ↓ 6.6 2,883 1

Index Scan using v0201_pkey on v0201 (cost=0.43..1,791.58 rows=439 width=14) (actual time=6.340..138.236 rows=2,883 loops=1)

  • Index Cond: ((empresa = 1) AND (ejercicio = 2,020) AND ((almacen)::text = '35'::text))
  • Filter: ((fecha_documento >= '2020-01-01'::date) AND (fecha_documento <= '2020-12-31'::date))
6. 3,260.673 3,260.673 ↓ 12.0 12 2,883

Index Scan using v020101_1 on v020101 (cost=0.56..2.78 rows=1 width=33) (actual time=0.444..1.131 rows=12 loops=2,883)

  • Index Cond: ((albaran = v0201.documento) AND ((almacen)::text = '35'::text) AND (ejercicio = 2,020) AND ((tipo_movimiento)::text = (v0201.tipo_doc)::text) AND (empresa = 1))
7. 586.942 586.942 ↑ 1.0 1 34,526

Index Scan using m0301_pkey on m0301 (cost=0.42..1.22 rows=1 width=19) (actual time=0.017..0.017 rows=1 loops=34,526)

  • Index Cond: (((codigo)::text = (v020101.articulo)::text) AND (empresa = 1))
Planning time : 2.688 ms