explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gOCE : teste

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 332.511 ↓ 2.0 4 1

Unique (cost=66,697.03..66,697.07 rows=2 width=138) (actual time=332.506..332.511 rows=4 loops=1)

2. 0.161 332.507 ↓ 2.0 4 1

Sort (cost=66,697.03..66,697.03 rows=2 width=138) (actual time=332.505..332.507 rows=4 loops=1)

  • Sort Key: *SELECT* 1.empresa, ((*SELECT* 1.filial)::integer), *SELECT* 1.produto, *SELECT* 1.data, *SELECT* 1.customedio, *SELECT* 1.valor, *SELECT* 1.lancto, *SELECT* 1.nota
  • Sort Method: quicksort Memory: 25kB
3. 0.005 332.346 ↓ 2.0 4 1

Append (cost=33,348.49..66,697.02 rows=2 width=138) (actual time=331.867..332.346 rows=4 loops=1)

4. 0.012 331.882 ↓ 3.0 3 1

Subquery Scan on *SELECT* 1 (cost=33,348.49..33,348.51 rows=1 width=138) (actual time=331.865..331.882 rows=3 loops=1)

5. 0.009 331.870 ↓ 3.0 3 1

Unique (cost=33,348.49..33,348.50 rows=1 width=136) (actual time=331.857..331.870 rows=3 loops=1)

6. 0.076 331.861 ↓ 14.0 14 1

Sort (cost=33,348.49..33,348.49 rows=1 width=136) (actual time=331.855..331.861 rows=14 loops=1)

  • Sort Key: movext.e01codigo, movext.e35filial, movext.e51datal DESC, movext.e51lancto DESC
  • Sort Method: quicksort Memory: 26kB
7. 283.138 331.785 ↓ 14.0 14 1

Bitmap Heap Scan on movext (cost=303.09..33,348.48 rows=1 width=136) (actual time=65.725..331.785 rows=14 loops=1)

  • Recheck Cond: (e18codpro = '730145100'::bpchar)
  • Filter: ((e51_e22calcusto <> 'N'::bpchar) AND (e51qtotal <> '0'::numeric) AND (e51vtotal <> '0'::numeric) AND (e51_e22tipolc = '1'::bpchar) AND (e51atuest = 1) AND (e51tipoaloca = ' '::bpchar) AND (e51situa = ''::bpchar))
  • Rows Removed by Filter: 38
  • Heap Blocks: exact=33
8. 48.647 48.647 ↑ 181.2 52 1

Bitmap Index Scan on movext_e18codpro_e51datal (cost=0.00..303.09 rows=9,422 width=0) (actual time=48.647..48.647 rows=52 loops=1)

  • Index Cond: (e18codpro = '730145100'::bpchar)
9. 0.005 0.459 ↑ 1.0 1 1

Unique (cost=33,348.49..33,348.50 rows=1 width=138) (actual time=0.449..0.459 rows=1 loops=1)

10. 0.064 0.454 ↓ 14.0 14 1

Sort (cost=33,348.49..33,348.49 rows=1 width=138) (actual time=0.448..0.454 rows=14 loops=1)

  • Sort Key: movext_1.e01codigo, movext_1.e51datal DESC, movext_1.e51lancto DESC
  • Sort Method: quicksort Memory: 26kB
11. 0.332 0.390 ↓ 14.0 14 1

Bitmap Heap Scan on movext movext_1 (cost=303.09..33,348.48 rows=1 width=138) (actual time=0.113..0.390 rows=14 loops=1)

  • Recheck Cond: (e18codpro = '730145100'::bpchar)
  • Filter: ((e51_e22calcusto <> 'N'::bpchar) AND (e51qtotal <> '0'::numeric) AND (e51vtotal <> '0'::numeric) AND (e51_e22tipolc = '1'::bpchar) AND (e51atuest = 1) AND (e51tipoaloca = ' '::bpchar) AND (e51situa = ''::bpchar))
  • Rows Removed by Filter: 38
  • Heap Blocks: exact=33
12. 0.058 0.058 ↑ 181.2 52 1

Bitmap Index Scan on movext_e18codpro_e51datal (cost=0.00..303.09 rows=9,422 width=0) (actual time=0.058..0.058 rows=52 loops=1)

  • Index Cond: (e18codpro = '730145100'::bpchar)