explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jPoW

Settings
# exclusive inclusive rows x rows loops node
1. 13.981 33,362.174 ↓ 3.8 2,763 1

WindowAgg (cost=182.09..22,296.17 rows=730 width=444) (actual time=33,360.699..33,362.174 rows=2,763 loops=1)

2. 20.288 33,348.193 ↓ 3.8 2,763 1

Subquery Scan on tab1 (cost=182.09..22,279.75 rows=730 width=452) (actual time=47.120..33,348.193 rows=2,763 loops=1)

3. 48.712 32,990.124 ↓ 3.8 2,763 1

Hash Join (cost=182.09..20,755.87 rows=730 width=404) (actual time=46.681..32,990.124 rows=2,763 loops=1)

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

Initplan (forHash Join)

5. 0.012 0.012 ↑ 1.0 1 1

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

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

Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.016..0.017 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. 3.736 265.316 ↓ 3.8 2,763 1

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

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

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

10. 8.028 245.998 ↓ 3.8 2,763 1

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

11. 3.635 221.392 ↓ 3.8 2,763 1

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

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

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

13. 5.177 196.048 ↓ 3.8 2,763 1

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

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

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

15. 4.946 167.936 ↓ 3.8 2,763 1

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

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

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

17. 78.133 78.133 ↓ 3.8 2,763 1

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

  • Filter: (("teacIs_Excluido" IS FALSE) AND ("teacDataInicio" >= $39) AND ("teacDataInicio" <= $40))
  • Rows Removed by Filter: 143758
18. 77.364 77.364 ↑ 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.027..0.028 rows=1 loops=2,763)

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

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

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

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

21. 13.815 13.815 ↑ 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.005..0.005 rows=1 loops=2,763)

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

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

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

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

24. 16.578 16.578 ↑ 1.0 1 2,763

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

  • Index Cond: ("tpeID" = tcl."tcltpeID")
25. 0.006 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.004 0.004 ↑ 1.0 6 1

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

27. 16.578 16.578 ↑ 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.005..0.006 rows=1 loops=2,763)

  • Index Cond: ("tpcID" = tos."tostpcID")
28. 11.052 11.052 ↑ 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.002..0.004 rows=1 loops=2,763)

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

Hash (cost=1.05..1.05 rows=5 width=36) (actual time=0.011..0.011 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.005..0.005 rows=5 loops=1)

31. 0.087 0.825 ↑ 1.0 265 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
32. 0.140 0.738 ↑ 1.0 265 1

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

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

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

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

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

35. 0.075 0.172 ↑ 1.0 265 1

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

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

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

37. 0.049 0.195 ↑ 1.0 127 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
38. 0.080 0.146 ↑ 1.0 127 1

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

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

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

40. 0.020 0.032 ↑ 1.0 46 1

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

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

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

42.          

SubPlan (forHash Join)

43. 11.052 11.052 ↑ 1.0 1 2,763

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.004..0.004 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. 8.289 16,177.365 ↑ 1.0 1 2,763

Aggregate (cost=12.75..12.76 rows=1 width=8) (actual time=5.855..5.855 rows=1 loops=2,763)

46. 16,169.076 16,169.076 ↑ 1,000.0 1 2,763

Function Scan on proc_cliente_getsuspensoesassessoria_porminuto (cost=0.25..10.25 rows=1,000 width=4) (actual time=5.852..5.852 rows=1 loops=2,763)

47. 5.526 15,867.909 ↓ 0.0 0 2,763

Limit (cost=0.25..0.26 rows=1 width=8) (actual time=5.743..5.743 rows=0 loops=2,763)

48. 15,862.383 15,862.383 ↓ 0.0 0 2,763

Function Scan on proc_cliente_getsuspensoesassessoria_porminuto proc_cliente_getsuspensoesassessoria_porminuto_1 (cost=0.25..10.25 rows=1,000 width=8) (actual time=5.741..5.741 rows=0 loops=2,763)

49. 276.300 276.300 ↑ 1.0 1 2,763

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

50. 102.231 323.271 ↑ 1.0 1 2,763

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

51.          

Initplan (forFunction Scan)

52. 221.040 221.040 ↑ 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.079..0.080 rows=1 loops=2,763)

53. 13.815 13.815 ↑ 1.0 1 2,763

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

54.          

SubPlan (forSubquery Scan)

55. 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)

56. 0.000 0.000 ↓ 0.0 0

Result (cost=0.29..0.31 rows=1 width=32) (never executed)

57.          

Initplan (forResult)

58. 0.000 0.000 ↓ 0.0 0

Function Scan on proc_common_addbusinessdays_byminutes (cost=0.28..0.29 rows=1 width=8) (never executed)

59.          

Initplan (forFunction Scan)

60. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=8) (never executed)

61. 0.438 18.177 ↑ 1.0 1 73

Result (cost=0.30..0.31 rows=1 width=32) (actual time=0.249..0.249 rows=1 loops=73)

62.          

Initplan (forResult)

63. 17.593 17.739 ↑ 1.0 1 73

Function Scan on proc_common_addbusinessdays_byminutes proc_common_addbusinessdays_byminutes_1 (cost=0.29..0.30 rows=1 width=8) (actual time=0.242..0.243 rows=1 loops=73)

64.          

Initplan (forFunction Scan)

65. 0.146 0.146 ↑ 1.0 1 73

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

66. 0.000 0.000 ↓ 0.0 0

Result (cost=0.31..0.32 rows=1 width=32) (never executed)

67.          

Initplan (forResult)

68. 0.000 0.000 ↓ 0.0 0

Function Scan on proc_common_addbusinessdays_byminutes proc_common_addbusinessdays_byminutes_2 (cost=0.30..0.31 rows=1 width=8) (never executed)

69.          

Initplan (forFunction Scan)

70. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=8) (never executed)

71. 6.215 140.459 ↑ 1.0 1 1,243

Result (cost=0.27..0.28 rows=1 width=32) (actual time=0.113..0.113 rows=1 loops=1,243)

72.          

Initplan (forResult)

73. 134.244 134.244 ↑ 1.0 1 1,243

Function Scan on proc_common_addbusinessdays_byminutes proc_common_addbusinessdays_byminutes_3 (cost=0.26..0.27 rows=1 width=8) (actual time=0.108..0.108 rows=1 loops=1,243)

74. 75.598 75.600 ↑ 1.0 1 2,520

Function Scan on proc_common_countbusinessdays (cost=0.27..0.28 rows=1 width=8) (actual time=0.030..0.030 rows=1 loops=2,520)

75.          

Initplan (forFunction Scan)

76. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1)

77. 29.157 95.256 ↑ 1.0 1 243

Function Scan on proc_common_countbusinessdays proc_common_countbusinessdays_1 (cost=0.56..0.57 rows=1 width=8) (actual time=0.392..0.392 rows=1 loops=243)

78.          

Initplan (forFunction Scan)

79. 0.003 0.003 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

80. 65.853 66.096 ↑ 1.0 1 243

Function Scan on proc_common_addbusinessdays_byminutes proc_common_addbusinessdays_byminutes_4 (cost=0.29..0.30 rows=1 width=8) (actual time=0.272..0.272 rows=1 loops=243)

81.          

Initplan (forFunction Scan)

82. 0.243 0.243 ↑ 1.0 1 243

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

Planning time : 8.827 ms
Execution time : 33,363.456 ms