explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VVw3

Settings
# exclusive inclusive rows x rows loops node
1. 21.795 39.888 ↑ 388.7 25 1

Hash Right Join (cost=5,186.27..9,606.20 rows=9,717 width=89) (actual time=39.810..39.888 rows=25 loops=1)

  • Hash Cond: (((cv.fonte_id)::integer = (cf.fonte_id)::integer) AND ((cv.digitacao_id)::integer = (d.digitacao_id)::integer))
  • Filter: ((hashed SubPlan 1) OR (hashed SubPlan 2) OR (d.telemarketing_id IS NULL) OR ((d.telemarketing_id IS NOT NULL) AND (d.status IS NULL)))
  • Rows Removed by Filter: 32
2. 17.601 17.601 ↑ 1.0 117,847 1

Seq Scan on cad_visita cv (cost=0.00..3,535.80 rows=117,880 width=14) (actual time=0.007..17.601 rows=117,847 loops=1)

3. 0.030 0.451 ↑ 205.4 57 1

Hash (cost=5,004.42..5,004.42 rows=11,708 width=89) (actual time=0.451..0.451 rows=57 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 141kB
4. 0.022 0.421 ↑ 205.4 57 1

Nested Loop (cost=0.42..5,004.42 rows=11,708 width=89) (actual time=0.223..0.421 rows=57 loops=1)

5. 0.267 0.267 ↑ 1.2 33 1

Seq Scan on cad_fonte cf (cost=0.00..39.40 rows=39 width=4) (actual time=0.209..0.267 rows=33 loops=1)

  • Filter: ((tipofonte)::smallint = 7)
  • Rows Removed by Filter: 800
6. 0.132 0.132 ↑ 271.0 2 33

Index Scan using idxdigitacaofonte on cad_digitacao d (cost=0.42..121.89 rows=542 width=89) (actual time=0.003..0.004 rows=2 loops=33)

  • Index Cond: ((fonte_id)::integer = (cf.fonte_id)::integer)
7.          

SubPlan (forHash Right Join)

8. 0.015 0.031 ↑ 33.3 3 1

ProjectSet (cost=0.28..2.87 rows=100 width=4) (actual time=0.029..0.031 rows=3 loops=1)

9. 0.016 0.016 ↑ 1.0 1 1

Index Only Scan using idxsysvarname on sys_var (cost=0.28..2.30 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (name = '/Company/StatusFunilVendasAgendados'::text)
  • Heap Fetches: 0
10. 0.006 0.010 ↑ 25.0 4 1

ProjectSet (cost=0.28..2.87 rows=100 width=4) (actual time=0.009..0.010 rows=4 loops=1)

11. 0.004 0.004 ↑ 1.0 1 1

Index Only Scan using idxsysvarname on sys_var sys_var_1 (cost=0.28..2.30 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (name = '/Company/StatusFunilVendasTrabalhando'::text)
  • Heap Fetches: 0
Planning time : 0.676 ms
Execution time : 40.017 ms