explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EtLq

Settings
# exclusive inclusive rows x rows loops node
1. 7.309 701.770 ↓ 3.8 2,763 1

WindowAgg (cost=182.09..11,285.95 rows=730 width=388) (actual time=700.338..701.770 rows=2,763 loops=1)

2. 3.949 694.461 ↓ 3.8 2,763 1

Subquery Scan on tab1 (cost=182.09..11,269.52 rows=730 width=396) (actual time=4.346..694.461 rows=2,763 loops=1)

3. 23.102 684.986 ↓ 3.8 2,763 1

Hash Join (cost=182.09..11,251.27 rows=730 width=388) (actual time=4.341..684.986 rows=2,763 loops=1)

  • Hash Cond: (tac."tactuiID" = tui."tuiID")
4.          

Initplan (forHash Join)

5. 0.013 0.013 ↑ 1.0 1 1

Seq Scan on "TabMenuInterno" (cost=0.00..1.58 rows=1 width=32) (actual time=0.013..0.013 rows=1 loops=1)

  • Filter: ("tmiValor" = 'controle_processo'::text)
  • Rows Removed by Filter: 45
6. 0.012 0.012 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=1)

7. 0.004 0.004 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

8. 2.265 105.678 ↓ 3.8 2,763 1

Hash Join (cost=132.99..10,586.24 rows=730 width=240) (actual time=2.346..105.678 rows=2,763 loops=1)

  • Hash Cond: (teac."teactsssID" = tsss."tsssID")
9. 4.225 103.400 ↓ 3.8 2,763 1

Nested Loop (cost=131.88..10,575.09 rows=730 width=212) (actual time=2.325..103.400 rows=2,763 loops=1)

10. 4.301 93.649 ↓ 3.8 2,763 1

Nested Loop (cost=131.74..10,443.07 rows=730 width=180) (actual time=2.320..93.649 rows=2,763 loops=1)

11. 2.417 81.059 ↓ 3.8 2,763 1

Hash Join (cost=131.45..9,684.74 rows=730 width=180) (actual time=2.313..81.059 rows=2,763 loops=1)

  • Hash Cond: (tos."tostemID" = tem."temID")
12. 4.828 78.632 ↓ 3.8 2,763 1

Nested Loop (cost=130.32..9,673.57 rows=730 width=152) (actual time=2.295..78.632 rows=2,763 loops=1)

13. 2.968 65.515 ↓ 3.8 2,763 1

Hash Join (cost=130.03..9,038.09 rows=730 width=136) (actual time=2.286..65.515 rows=2,763 loops=1)

  • Hash Cond: (tos."tostclID" = tcl."tclID")
14. 4.137 60.855 ↓ 3.8 2,763 1

Nested Loop (cost=36.77..8,934.79 rows=730 width=132) (actual time=0.567..60.855 rows=2,763 loops=1)

15. 2.721 48.429 ↓ 3.8 2,763 1

Hash Left Join (cost=36.49..8,705.07 rows=730 width=119) (actual time=0.559..48.429 rows=2,763 loops=1)

  • Hash Cond: (tac."tactseID" = tse."tseID")
16. 3.784 45.208 ↓ 3.8 2,763 1

Nested Loop (cost=0.42..8,659.08 rows=730 width=119) (actual time=0.048..45.208 rows=2,763 loops=1)

17. 27.609 27.609 ↓ 3.8 2,763 1

Seq Scan on "TabEtapaAssessoriaCliente" teac (cost=0.00..4,268.41 rows=730 width=65) (actual time=0.037..27.609 rows=2,763 loops=1)

  • Filter: (("teacIs_Excluido" IS FALSE) AND ("teacDataInicio" >= $10) AND ("teacDataInicio" <= $11))
  • Rows Removed by Filter: 143758
18. 13.815 13.815 ↑ 1.0 1 2,763

Index Scan using "TabAssessoriaCliente_tacID" on "TabAssessoriaCliente" tac (cost=0.42..6.00 rows=1 width=58) (actual time=0.004..0.005 rows=1 loops=2,763)

  • Index Cond: ("tacID" = teac."teactacID")
19. 0.235 0.500 ↓ 1.0 817 1

Hash (cost=26.03..26.03 rows=803 width=4) (actual time=0.500..0.500 rows=817 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 37kB
20. 0.265 0.265 ↓ 1.0 817 1

Seq Scan on "TabServico" tse (cost=0.00..26.03 rows=803 width=4) (actual time=0.004..0.265 rows=817 loops=1)

21. 8.289 8.289 ↑ 1.0 1 2,763

Index Scan using "TabOrdemServico_tosID" on "TabOrdemServico" tos (cost=0.28..0.30 rows=1 width=17) (actual time=0.003..0.003 rows=1 loops=2,763)

  • Index Cond: ("tosID" = tac."tactosID")
22. 0.863 1.692 ↑ 1.0 2,880 1

Hash (cost=56.45..56.45 rows=2,945 width=8) (actual time=1.692..1.692 rows=2,880 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 145kB
23. 0.829 0.829 ↑ 1.0 2,880 1

Seq Scan on "TabCliente" tcl (cost=0.00..56.45 rows=2,945 width=8) (actual time=0.006..0.829 rows=2,880 loops=1)

24. 8.289 8.289 ↑ 1.0 1 2,763

Index Scan using "TabPessoaID" on "TabPessoa" tpe (cost=0.29..0.86 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=2,763)

  • Index Cond: ("tpeID" = tcl."tcltpeID")
25. 0.005 0.010 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=36) (actual time=0.010..0.010 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.005 0.005 ↑ 1.0 6 1

Seq Scan on "TabEmpresa" tem (cost=0.00..1.06 rows=6 width=36) (actual time=0.004..0.005 rows=6 loops=1)

27. 8.289 8.289 ↑ 1.0 1 2,763

Index Scan using "TabPropostaComercial_tpcID" on "TabPropostaComercial" tpc (cost=0.28..1.03 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=2,763)

  • Index Cond: ("tpcID" = tos."tostpcID")
28. 5.526 5.526 ↑ 1.0 1 2,763

Index Scan using "TabAssessoria_tasID" on "TabAssessoria" tas (cost=0.14..0.17 rows=1 width=40) (actual time=0.001..0.002 rows=1 loops=2,763)

  • Index Cond: ("tasID" = tpc."tpctasID")
29. 0.008 0.013 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=36) (actual time=0.013..0.013 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.005 0.005 ↑ 1.0 5 1

Seq Scan on "TabServiceStepState" tsss (cost=0.00..1.05 rows=5 width=36) (actual time=0.003..0.005 rows=5 loops=1)

31. 0.079 0.814 ↑ 1.0 265 1

Hash (cost=44.19..44.19 rows=265 width=4) (actual time=0.814..0.814 rows=265 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
32. 0.151 0.735 ↑ 1.0 265 1

Hash Join (cost=23.60..44.19 rows=265 width=4) (actual time=0.386..0.735 rows=265 loops=1)

  • Hash Cond: (tfu."tfutcfID" = tcf."tcfID")
33. 0.127 0.400 ↑ 1.0 265 1

Hash Join (cost=14.96..31.90 rows=265 width=8) (actual time=0.194..0.400 rows=265 loops=1)

  • Hash Cond: (tfu."tfuID" = tui."tuitfuID")
34. 0.093 0.093 ↑ 1.0 286 1

Seq Scan on "TabFuncionario" tfu (cost=0.00..12.86 rows=286 width=8) (actual time=0.003..0.093 rows=286 loops=1)

35. 0.079 0.180 ↑ 1.0 265 1

Hash (cost=11.65..11.65 rows=265 width=8) (actual time=0.180..0.180 rows=265 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
36. 0.101 0.101 ↑ 1.0 265 1

Seq Scan on "TabUsuarioInterno" tui (cost=0.00..11.65 rows=265 width=8) (actual time=0.004..0.101 rows=265 loops=1)

37. 0.033 0.184 ↑ 1.0 127 1

Hash (cost=7.05..7.05 rows=127 width=4) (actual time=0.184..0.184 rows=127 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
38. 0.090 0.151 ↑ 1.0 127 1

Hash Join (cost=2.04..7.05 rows=127 width=4) (actual time=0.050..0.151 rows=127 loops=1)

  • Hash Cond: (tcf."tcftdeID" = tde."tdeID")
39. 0.030 0.030 ↑ 1.0 127 1

Seq Scan on "TabCargoFuncionario" tcf (cost=0.00..3.27 rows=127 width=8) (actual time=0.009..0.030 rows=127 loops=1)

40. 0.015 0.031 ↑ 1.0 46 1

Hash (cost=1.46..1.46 rows=46 width=4) (actual time=0.031..0.031 rows=46 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
41. 0.016 0.016 ↑ 1.0 46 1

Seq Scan on "TabDepartamento" tde (cost=0.00..1.46 rows=46 width=4) (actual time=0.004..0.016 rows=46 loops=1)

42.          

SubPlan (forHash Join)

43. 5.526 5.526 ↑ 1.0 1 2,763

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=2,763)

44. 5.526 5.526 ↑ 1.0 1 2,763

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=2,763)

45. 232.092 232.092 ↑ 1.0 1 2,763

Function Scan on proc_common_addbusinessdays (cost=0.25..0.26 rows=1 width=4) (actual time=0.084..0.084 rows=1 loops=2,763)

46. 77.364 303.930 ↑ 1.0 1 2,763

Function Scan on proc_common_countbusinessdays (cost=0.52..0.53 rows=1 width=8) (actual time=0.110..0.110 rows=1 loops=2,763)

47.          

Initplan (forFunction Scan)

48. 226.566 226.566 ↑ 1.0 1 2,763

Function Scan on proc_common_addbusinessdays proc_common_addbusinessdays_1 (cost=0.25..0.26 rows=1 width=4) (actual time=0.082..0.082 rows=1 loops=2,763)

49. 8.289 8.289 ↑ 1.0 1 2,763

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=2,763)

50.          

SubPlan (forSubquery Scan)

51. 5.526 5.526 ↑ 1.0 1 2,763

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=2,763)

Planning time : 4.522 ms
Execution time : 702.865 ms