explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L7X8

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 15.864 ↑ 1.0 1 1

Aggregate (cost=1,318.55..1,318.56 rows=1 width=32) (actual time=15.864..15.864 rows=1 loops=1)

2. 0.017 15.855 ↓ 5.0 5 1

Sort (cost=1,318.53..1,318.54 rows=1 width=24) (actual time=15.854..15.855 rows=5 loops=1)

  • Sort Key: ((SubPlan 1)), ((SubPlan 2)), (((random() * '10'::double precision))::integer)
  • Sort Method: quicksort Memory: 25kB
3. 0.040 15.838 ↓ 5.0 5 1

Nested Loop (cost=0.27..1,318.52 rows=1 width=24) (actual time=4.151..15.838 rows=5 loops=1)

4. 0.018 0.018 ↓ 5.0 5 1

Seq Scan on "TabVendedorEmpresa" (cost=0.00..1.58 rows=1 width=4) (actual time=0.012..0.018 rows=5 loops=1)

  • Filter: (("tveIsActive" IS TRUE) AND ("tvetemID" = 6))
  • Rows Removed by Filter: 41
5. 0.020 0.020 ↑ 1.0 1 5

Index Scan using "TabFuncionario_tfuID" on "TabFuncionario" (cost=0.27..8.29 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=5)

  • Index Cond: ("tfuID" = "TabVendedorEmpresa"."tvetfuID")
  • Filter: ("tfuAtivo" IS TRUE)
6.          

SubPlan (forNested Loop)

7. 0.210 6.765 ↑ 1.0 1 5

Aggregate (cost=394.03..394.04 rows=1 width=8) (actual time=1.353..1.353 rows=1 loops=5)

8. 6.555 6.555 ↓ 1.7 174 5

Seq Scan on "TabProspeccaoSituacaoEmpresa" (cost=0.00..393.77 rows=105 width=0) (actual time=0.740..1.311 rows=174 loops=5)

  • Filter: (("tpsetfuID" = "TabVendedorEmpresa"."tvetfuID") AND ("tpsetemID" = 6))
  • Rows Removed by Filter: 16344
9. 0.005 8.995 ↑ 1.0 1 5

Aggregate (cost=914.59..914.60 rows=1 width=8) (actual time=1.799..1.799 rows=1 loops=5)

10. 0.678 8.990 ↓ 0.0 0 5

Nested Loop (cost=0.28..914.58 rows=1 width=0) (actual time=1.609..1.798 rows=0 loops=5)

11. 6.570 6.570 ↓ 1.7 174 5

Seq Scan on "TabProspeccaoSituacaoEmpresa" "TabProspeccaoSituacaoEmpresa_1" (cost=0.00..393.77 rows=105 width=4) (actual time=0.757..1.314 rows=174 loops=5)

  • Filter: (("tpsetfuID" = "TabVendedorEmpresa"."tvetfuID") AND ("tpsetemID" = 6))
  • Rows Removed by Filter: 16344
12. 1.742 1.742 ↓ 0.0 0 871

Index Scan using "TabProvedor_tproID" on "TabProspeccao" (cost=0.28..4.95 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=871)

  • Index Cond: ("tproID" = "TabProspeccaoSituacaoEmpresa_1"."tpsetproID")
  • Filter: ("tproUF" = 'AC'::text)
  • Rows Removed by Filter: 1