explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2eUX

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 47.165 ↑ 1.0 1 1

Aggregate (cost=88,357.80..88,357.81 rows=1 width=32) (actual time=47.164..47.165 rows=1 loops=1)

2. 38.427 51.773 ↓ 25.0 25 1

Gather (cost=1,001.13..88,357.79 rows=1 width=3) (actual time=10.597..51.773 rows=25 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 1.726 13.346 ↓ 13.0 13 2

Nested Loop (cost=1.13..87,357.69 rows=1 width=3) (actual time=4.445..13.346 rows=13 loops=2)

4. 0.064 11.578 ↑ 30.1 42 2

Nested Loop (cost=0.56..78,290.38 rows=1,263 width=34) (actual time=4.377..11.578 rows=42 loops=2)

5. 11.483 11.483 ↑ 258.7 3 2

Parallel Seq Scan on tb_teste sm (cost=0.00..3,769.95 rows=776 width=19) (actual time=4.351..11.483 rows=3 loops=2)

  • Filter: (dt_data >= '2019-08-01'::date)
  • Rows Removed by Filter: 100498
6. 0.031 0.031 ↓ 17.0 17 5

Index Scan using pdvcup00_pkey on pdvcup00 p0 (cost=0.56..96.02 rows=1 width=25) (actual time=0.020..0.031 rows=17 loops=5)

  • Index Cond: ((emp = sm.cd_empresa) AND (dta = sm.dt_data) AND (pdv = sm.nr_pdv) AND (num > '0'::numeric))
  • Filter: (sm.cd_operador = ope)
  • Rows Removed by Filter: 9
7. 0.042 0.042 ↓ 0.0 0 83

Index Scan using pdvcup01_pkey on pdvcup01 p1 (cost=0.57..7.17 rows=1 width=23) (actual time=0.042..0.042 rows=0 loops=83)

  • Index Cond: ((emp = p0.emp) AND (dta = p0.dta) AND (pdv = p0.pdv) AND (num = p0.num) AND (bar > '0'::numeric))
  • Filter: (vad <> '0'::numeric)
  • Rows Removed by Filter: 27
Planning time : 1.857 ms
Execution time : 51.971 ms