explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J2D

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 5.151 692,423.612 ↓ 1,027.0 1,027 1

Sort (cost=551,360.52..551,360.53 rows=1 width=696) (actual time=692,423.572..692,423.612 rows=1,027 loops=1)

  • Sort Key: asiento.ccodsoc, asientol.ffechadoc, asientol_1.ccodclse, asientol_1.ccodenti
  • Sort Method: quicksort Memory: 578kB
2. 1.627 692,418.461 ↓ 1,027.0 1,027 1

Nested Loop Left Join (cost=271,963.30..551,360.51 rows=1 width=696) (actual time=579.762..692,418.461 rows=1,027 loops=1)

3. 2.603 692,412.726 ↓ 1,027.0 1,027 1

Nested Loop Left Join (cost=271,962.88..551,352.07 rows=1 width=537) (actual time=579.755..692,412.726 rows=1,027 loops=1)

  • Join Filter: (asientol_1.ccodfis = codfis.ccodfis)
4. 2.685 692,402.934 ↓ 1,027.0 1,027 1

Nested Loop Left Join (cost=271,962.60..551,343.76 rows=1 width=433) (actual time=579.749..692,402.934 rows=1,027 loops=1)

5. 188.648 691,014.826 ↓ 1,027.0 1,027 1

Nested Loop (cost=271,962.17..551,335.30 rows=1 width=403) (actual time=579.743..691,014.826 rows=1,027 loops=1)

  • Join Filter: ((asientol_1.ccladoc = asientol.ccladoc) AND (asientol_1.cserdoc = asientol.cserdoc) AND (asientol_1.cnumdoc = asientol.cnumdoc) AND (asientol_1.ccodclse = asientol.ccodclse) AND (asientol_1.ccodenti = asientol.ccoden (...)
  • Rows Removed by Join Filter: 1051648
6. 7.767 586.053 ↓ 1,025.0 1,025 1

GroupAggregate (cost=271,962.17..271,962.27 rows=1 width=183) (actual time=577.672..586.053 rows=1,025 loops=1)

  • Group Key: asientol_1.ccodfis, asientol_1.ccladoc, asientol_1.cserdoc, asientol_1.cnumdoc, asientol_1.ceje, asientol_1.ccuenta, asientol_1.ccodclse, asientol_1.ccodenti, asientol_1.cidmat
7. 8.472 578.286 ↓ 904.5 1,809 1

Sort (cost=271,962.17..271,962.18 rows=2 width=183) (actual time=577.659..578.286 rows=1,809 loops=1)

  • Sort Key: asientol_1.ccodfis, asientol_1.ccladoc, asientol_1.cserdoc, asientol_1.cnumdoc, asientol_1.ceje, asientol_1.ccuenta, asientol_1.ccodclse, asientol_1.ccodenti, asientol_1.cidmat
  • Sort Method: quicksort Memory: 529kB
8. 0.304 569.814 ↓ 904.5 1,809 1

Nested Loop (cost=0.28..271,962.16 rows=2 width=183) (actual time=1.211..569.814 rows=1,809 loops=1)

9. 564.083 564.083 ↓ 603.0 1,809 1

Seq Scan on asientol asientol_1 (cost=0.00..271,937.22 rows=3 width=189) (actual time=1.175..564.083 rows=1,809 loops=1)

  • Filter: ((ccuenta = '4212'::bpchar) AND (ceje = '2019'::bpchar) AND (ccodsoc = 'S0001'::bpchar) AND (ccodfis = '20100127165'::bpchar))
  • Rows Removed by Filter: 2972502
10. 5.427 5.427 ↑ 1.0 1 1,809

Index Scan using pk_planl on planl (cost=0.28..8.30 rows=1 width=27) (actual time=0.003..0.003 rows=1 loops=1,809)

  • Index Cond: ((ccodpla = asientol_1.ccodpla) AND (ccuenta = '4212'::bpchar))
  • Filter: (nanacue = '2'::numeric)
11. 690,240.125 690,240.125 ↓ 1,027.0 1,027 1,025

Seq Scan on asientol (cost=0.00..279,373.00 rows=1 width=286) (actual time=0.356..673.405 rows=1,027 loops=1,025)

  • Filter: ((ceje = '2019'::bpchar) AND (ccuenta = '4212'::bpchar) AND (ccodfis = '20100127165'::bpchar) AND (ncomp = '1'::numeric) AND (ccodsoc = 'S0001'::bpchar))
  • Rows Removed by Filter: 2973284
12. 1,385.423 1,385.423 ↑ 1.0 1 1,027

Index Scan using pk_asiento on asiento (cost=0.42..8.44 rows=1 width=38) (actual time=1.349..1.349 rows=1 loops=1,027)

  • Index Cond: (asientol.nidasi = nidasi)
13. 7.189 7.189 ↑ 1.0 1 1,027

Index Scan using pk_codfis on codfis (cost=0.29..8.30 rows=1 width=120) (actual time=0.007..0.007 rows=1 loops=1,027)

  • Index Cond: (ccodfis = '20100127165'::bpchar)
14. 4.108 4.108 ↓ 0.0 0 1,027

Index Scan using pk_material on material (cost=0.41..8.43 rows=1 width=180) (actual time=0.004..0.004 rows=0 loops=1,027)

  • Index Cond: (asientol_1.cidmat = cidmat)
Planning time : 2.243 ms
Execution time : 692,424.012 ms