explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1CKZ

Settings
# exclusive inclusive rows x rows loops node
1. 5.653 719,157.856 ↓ 1,027.0 1,027 1

Sort (cost=531,223.79..531,223.79 rows=1 width=696) (actual time=719,157.819..719,157.856 rows=1,027 loops=1)

  • Sort Key: asiento.ccodsoc, asientol_1.ccuenta, asientol.ffechadoc, asientol_1.ccodclse, asientol_1.ccodenti, asientol_1.ccodfis
  • Sort Method: quicksort Memory: 578kB
2. 1.262 719,152.203 ↓ 1,027.0 1,027 1

Nested Loop Left Join (cost=276,444.18..531,223.78 rows=1 width=696) (actual time=1,179.063..719,152.203 rows=1,027 loops=1)

3. 1.780 719,146.833 ↓ 1,027.0 1,027 1

Nested Loop Left Join (cost=276,443.76..531,215.34 rows=1 width=537) (actual time=1,179.057..719,146.833 rows=1,027 loops=1)

4. 2.973 719,138.891 ↓ 1,027.0 1,027 1

Nested Loop Left Join (cost=276,443.48..531,207.02 rows=1 width=433) (actual time=1,179.046..719,138.891 rows=1,027 loops=1)

5. 3,849.389 719,124.621 ↓ 1,027.0 1,027 1

Nested Loop (cost=276,443.05..531,201.84 rows=1 width=403) (actual time=1,179.029..719,124.621 rows=1,027 loops=1)

  • Join Filter: ((asientol_1.ceje = asientol.ceje) AND (asientol_1.ccuenta = asientol.ccuenta) AND (asientol_1.ccodfis = asientol.ccodfis) AND (asientol_1.ccladoc = asientol.ccladoc) AND (asientol_1.cserdoc = asientol.cserdoc) AND (a (...)
  • Rows Removed by Join Filter: 14071198
6. 8.351 613.457 ↓ 1,025.0 1,025 1

GroupAggregate (cost=276,443.05..276,443.15 rows=1 width=183) (actual time=604.441..613.457 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.667 605.106 ↓ 904.5 1,809 1

Sort (cost=276,443.05..276,443.06 rows=2 width=183) (actual time=604.429..605.106 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.148 596.439 ↓ 904.5 1,809 1

Nested Loop (cost=0.28..276,443.04 rows=2 width=183) (actual time=30.203..596.439 rows=1,809 loops=1)

9. 590.864 590.864 ↓ 603.0 1,809 1

Seq Scan on asientol asientol_1 (cost=0.00..276,418.10 rows=3 width=189) (actual time=30.171..590.864 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: 2940007
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. 714,661.775 714,661.775 ↓ 1.0 13,729 1,025

Seq Scan on asientol (cost=0.00..254,352.69 rows=13,533 width=286) (actual time=0.075..697.231 rows=13,729 loops=1,025)

  • Filter: (ncomp = '1'::numeric)
  • Rows Removed by Filter: 2928087
12. 11.297 11.297 ↑ 1.0 1 1,027

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

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

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

  • Index Cond: (asientol_1.ccodfis = ccodfis)
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 : 1.725 ms
Execution time : 719,158.153 ms