explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3PMc

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 11,618.936 ↑ 1.0 50 1

Limit (cost=1,198,154.42..1,237,576.82 rows=50 width=582) (actual time=11,618.865..11,618.936 rows=50 loops=1)

2. 0.019 11,618.932 ↑ 4.0 50 1

Unique (cost=1,198,154.42..1,355,844.03 rows=200 width=582) (actual time=11,618.864..11,618.932 rows=50 loops=1)

3. 0.024 11,618.913 ↑ 17,062.7 50 1

Nested Loop Left Join (cost=1,198,154.42..1,353,711.19 rows=853,136 width=582) (actual time=11,618.862..11,618.913 rows=50 loops=1)

4. 0.027 11,618.889 ↑ 17,062.7 50 1

Merge Left Join (cost=1,198,154.28..1,217,233.42 rows=853,136 width=463) (actual time=11,618.853..11,618.889 rows=50 loops=1)

  • Merge Cond: ("*SELECT* 1".codigo = crpg.contasareceber_faturamentos_cr_codigo)
5. 696.236 11,424.044 ↑ 17,062.7 50 1

Sort (cost=1,087,213.87..1,089,346.71 rows=853,136 width=455) (actual time=11,424.036..11,424.044 rows=50 loops=1)

  • Sort Key: "*SELECT* 1".codigo
  • Sort Method: external merge Disk: 117288kB
6. 261.083 10,727.808 ↑ 1.0 820,010 1

Hash Left Join (cost=152,594.85..653,246.66 rows=853,136 width=455) (actual time=1,031.926..10,727.808 rows=820,010 loops=1)

  • Hash Cond: ("*SELECT* 1".vendedores_codigo = v.codigo)
7. 69.918 10,466.711 ↑ 1.0 820,010 1

Append (cost=152,591.98..650,956.85 rows=853,136 width=446) (actual time=1,031.909..10,466.711 rows=820,010 loops=1)

8. 162.325 10,391.350 ↑ 1.0 820,000 1

Subquery Scan on *SELECT* 1 (cost=152,591.98..522,320.27 rows=820,000 width=446) (actual time=1,031.908..10,391.350 rows=820,000 loops=1)

9. 5,550.297 10,229.025 ↑ 1.0 820,000 1

Hash Left Join (cost=152,591.98..514,120.27 rows=820,000 width=538) (actual time=1,031.906..10,229.025 rows=820,000 loops=1)

  • Hash Cond: ("*SELECT* 1_1".tipodocumento_codigo = t_1.codigo)
10. 169.294 4,678.720 ↑ 1.0 820,000 1

Hash Left Join (cost=152,590.50..304,870.68 rows=820,000 width=364) (actual time=1,031.698..4,678.720 rows=820,000 loops=1)

  • Hash Cond: ("*SELECT* 1_1".gruposcontas_codigo = grct.codigo)
11. 225.776 4,509.424 ↑ 1.0 820,000 1

Hash Left Join (cost=152,570.60..302,677.54 rows=820,000 width=246) (actual time=1,031.692..4,509.424 rows=820,000 loops=1)

  • Hash Cond: (cr_sit.situacoesconta_codigo = sc.codigo)
12. 312.994 4,283.642 ↑ 1.0 820,000 1

Hash Left Join (cost=152,550.93..300,484.15 rows=820,000 width=125) (actual time=1,031.681..4,283.642 rows=820,000 loops=1)

  • Hash Cond: ("*SELECT* 1_1".clientes_codigo = c.codigo)
13. 676.301 3,966.155 ↑ 1.0 820,000 1

Hash Join (cost=151,258.93..297,039.04 rows=820,000 width=99) (actual time=1,027.177..3,966.155 rows=820,000 loops=1)

  • Hash Cond: ("*SELECT* 1_1".prevendas_codigo = pv.codigo)
14. 538.129 3,121.041 ↑ 1.0 820,000 1

Hash Left Join (cost=126,546.82..243,791.39 rows=820,000 width=91) (actual time=858.306..3,121.041 rows=820,000 loops=1)

  • Hash Cond: ("*SELECT* 1_1".codigo = cr_sit.contasareceber_codigo)
15. 466.548 2,442.305 ↑ 1.0 820,000 1

Hash Join (cost=101,262.89..190,728.96 rows=820,000 width=87) (actual time=717.623..2,442.305 rows=820,000 loops=1)

  • Hash Cond: ("*SELECT* 1_1".codigo = cr_fat.contasareceber_codigo)
16. 39.342 1,784.866 ↑ 1.0 820,000 1

Append (cost=74,385.76..136,073.31 rows=820,000 width=87) (actual time=526.692..1,784.866 rows=820,000 loops=1)

17. 81.053 1,745.524 ↑ 1.0 820,000 1

Subquery Scan on *SELECT* 1_1 (cost=74,385.76..131,973.31 rows=820,000 width=87) (actual time=526.690..1,745.524 rows=820,000 loops=1)

18. 434.886 1,664.471 ↑ 1.0 820,000 1

Hash Join (cost=74,385.76..123,773.31 rows=820,000 width=168) (actual time=526.690..1,664.471 rows=820,000 loops=1)

  • Hash Cond: (pvpg_cr.contasareceber_codigo = cr.codigo)
19. 311.035 949.874 ↑ 1.0 820,000 1

Hash Join (cost=40,879.81..73,699.86 rows=820,000 width=12) (actual time=246.955..949.874 rows=820,000 loops=1)

  • Hash Cond: (pvpg.codprevenda = pv_1.codigo)
20. 318.729 510.205 ↑ 1.0 820,000 1

Hash Join (cost=16,639.69..39,012.21 rows=820,000 width=8) (actual time=118.207..510.205 rows=820,000 loops=1)

  • Hash Cond: (pvpg_cr.prevendas_pagtos_codigo = pvpg.codigo)
21. 73.317 73.317 ↑ 1.0 820,000 1

Seq Scan on prevendas_pagtos_contasareceber pvpg_cr (cost=0.00..11,829.00 rows=820,000 width=8) (actual time=0.007..73.317 rows=820,000 loops=1)

22. 64.575 118.159 ↓ 1.0 507,455 1

Hash (cost=8,313.53..8,313.53 rows=507,453 width=8) (actual time=118.159..118.159 rows=507,455 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3498kB
23. 53.584 53.584 ↓ 1.0 507,455 1

Seq Scan on prevenda_pagto pvpg (cost=0.00..8,313.53 rows=507,453 width=8) (actual time=0.005..53.584 rows=507,455 loops=1)

  • Filter: (codprevenda IS NOT NULL)
24. 62.084 128.634 ↑ 1.0 483,072 1

Hash (cost=16,314.72..16,314.72 rows=483,072 width=8) (actual time=128.634..128.634 rows=483,072 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3385kB
25. 66.550 66.550 ↑ 1.0 483,072 1

Seq Scan on prevendas pv_1 (cost=0.00..16,314.72 rows=483,072 width=8) (actual time=0.010..66.550 rows=483,072 loops=1)

26. 149.693 279.711 ↑ 1.0 820,042 1

Hash (cost=16,848.42..16,848.42 rows=820,042 width=35) (actual time=279.711..279.711 rows=820,042 loops=1)

  • Buckets: 65536 Batches: 32 Memory Usage: 2161kB
27. 130.018 130.018 ↑ 1.0 820,042 1

Seq Scan on contasareceber cr (cost=0.00..16,848.42 rows=820,042 width=35) (actual time=0.179..130.018 rows=820,042 loops=1)

28. 101.298 190.891 ↓ 1.0 820,007 1

Hash (cost=13,423.06..13,423.06 rows=820,006 width=4) (actual time=190.891..190.891 rows=820,007 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 2832kB
29. 89.593 89.593 ↓ 1.0 820,007 1

Seq Scan on contasareceber_faturamentos cr_fat (cost=0.00..13,423.06 rows=820,006 width=4) (actual time=0.011..89.593 rows=820,007 loops=1)

  • Filter: (contasareceber_codigo IS NOT NULL)
30. 86.477 140.607 ↓ 1.0 820,042 1

Hash (cost=11,829.41..11,829.41 rows=820,041 width=8) (actual time=140.607..140.607 rows=820,042 loops=1)

  • Buckets: 131072 Batches: 16 Memory Usage: 3033kB
31. 54.130 54.130 ↓ 1.0 820,042 1

Seq Scan on contasareceber_situacao cr_sit (cost=0.00..11,829.41 rows=820,041 width=8) (actual time=0.007..54.130 rows=820,042 loops=1)

32. 64.810 168.813 ↑ 1.0 483,072 1

Hash (cost=16,314.72..16,314.72 rows=483,072 width=12) (actual time=168.813..168.813 rows=483,072 loops=1)

  • Buckets: 131072 Batches: 8 Memory Usage: 3385kB
33. 104.003 104.003 ↑ 1.0 483,072 1

Seq Scan on prevendas pv (cost=0.00..16,314.72 rows=483,072 width=12) (actual time=0.057..104.003 rows=483,072 loops=1)

34. 1.842 4.493 ↑ 1.0 14,622 1

Hash (cost=1,109.22..1,109.22 rows=14,622 width=30) (actual time=4.493..4.493 rows=14,622 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1036kB
35. 2.651 2.651 ↑ 1.0 14,622 1

Seq Scan on clientes c (cost=0.00..1,109.22 rows=14,622 width=30) (actual time=0.004..2.651 rows=14,622 loops=1)

36. 0.001 0.006 ↑ 71.7 6 1

Hash (cost=14.30..14.30 rows=430 width=125) (actual time=0.006..0.006 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
37. 0.005 0.005 ↑ 71.7 6 1

Seq Scan on situacoescontas sc (cost=0.00..14.30 rows=430 width=125) (actual time=0.004..0.005 rows=6 loops=1)

38. 0.000 0.002 ↓ 0.0 0 1

Hash (cost=14.40..14.40 rows=440 width=122) (actual time=0.002..0.002 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
39. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on gruposcontas grct (cost=0.00..14.40 rows=440 width=122) (actual time=0.002..0.002 rows=0 loops=1)

40. 0.003 0.008 ↓ 1.0 22 1

Hash (cost=1.21..1.21 rows=21 width=82) (actual time=0.008..0.008 rows=22 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
41. 0.005 0.005 ↓ 1.0 22 1

Seq Scan on tipodocumento t_1 (cost=0.00..1.21 rows=21 width=82) (actual time=0.003..0.005 rows=22 loops=1)

42. 0.000 0.444 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=1,296.31..71,942.14 rows=2,260 width=446) (actual time=0.444..0.444 rows=0 loops=1)

43. 0.000 0.444 ↓ 0.0 0 1

Nested Loop (cost=1,296.31..71,919.54 rows=2,260 width=538) (actual time=0.444..0.444 rows=0 loops=1)

44. 0.001 0.444 ↓ 0.0 0 1

Hash Left Join (cost=1,295.88..58,990.49 rows=2,260 width=434) (actual time=0.444..0.444 rows=0 loops=1)

  • Hash Cond: ("*SELECT* 2_1".tipodocumento_codigo = t_2.codigo)
45. 0.000 0.443 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,294.41..58,982.97 rows=2,260 width=356) (actual time=0.443..0.443 rows=0 loops=1)

46. 0.000 0.443 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,294.26..58,566.25 rows=2,260 width=238) (actual time=0.443..0.443 rows=0 loops=1)

47. 0.000 0.443 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,294.12..58,193.30 rows=2,260 width=117) (actual time=0.443..0.443 rows=0 loops=1)

48. 0.001 0.443 ↓ 0.0 0 1

Hash Left Join (cost=1,293.69..43,757.25 rows=2,260 width=113) (actual time=0.443..0.443 rows=0 loops=1)

  • Hash Cond: ("*SELECT* 2_1".clientes_codigo = c_1.codigo)
49. 0.024 0.442 ↓ 0.0 0 1

Nested Loop (cost=1.70..42,459.33 rows=2,260 width=87) (actual time=0.442..0.442 rows=0 loops=1)

50. 0.003 0.383 ↑ 64.6 35 1

Append (cost=1.27..27,493.63 rows=2,260 width=87) (actual time=0.063..0.383 rows=35 loops=1)

51. 0.004 0.380 ↑ 64.6 35 1

Subquery Scan on *SELECT* 2_1 (cost=1.27..27,482.33 rows=2,260 width=87) (actual time=0.063..0.380 rows=35 loops=1)

52. 0.000 0.376 ↑ 64.6 35 1

Nested Loop (cost=1.27..27,459.73 rows=2,260 width=168) (actual time=0.062..0.376 rows=35 loops=1)

53. 0.016 0.271 ↑ 64.6 35 1

Nested Loop (cost=0.85..26,091.05 rows=2,260 width=39) (actual time=0.055..0.271 rows=35 loops=1)

54. 0.036 0.185 ↑ 64.6 35 1

Nested Loop (cost=0.42..16,180.65 rows=2,260 width=39) (actual time=0.032..0.185 rows=35 loops=1)

55. 0.009 0.009 ↑ 64.6 35 1

Seq Scan on saidasnf_pagtos_contasareceber snfpg_cr (cost=0.00..32.60 rows=2,260 width=8) (actual time=0.006..0.009 rows=35 loops=1)

56. 0.140 0.140 ↑ 1.0 1 35

Index Scan using contasareceber_pkey1 on contasareceber cr_1 (cost=0.42..7.15 rows=1 width=35) (actual time=0.004..0.004 rows=1 loops=35)

  • Index Cond: (codigo = snfpg_cr.contasareceber_codigo)
57. 0.070 0.070 ↑ 1.0 1 35

Index Scan using saidasnf_pagto_pkey on saidasnf_pagto snfpg (cost=0.42..4.39 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=35)

  • Index Cond: (codigo = snfpg_cr.saidasnf_pagtos_codigo)
  • Filter: (codsaidasnf IS NOT NULL)
58. 0.105 0.105 ↑ 1.0 1 35

Index Scan using saidasnf_codigo_index on saidasnf snf_1 (cost=0.42..0.61 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=35)

  • Index Cond: (codigo = snfpg.codsaidasnf)
59. 0.035 0.035 ↓ 0.0 0 35

Index Only Scan using contasareceber_faturamentos_pkey on contasareceber_faturamentos cr_fat_1 (cost=0.42..6.62 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=35)

  • Index Cond: ((contasareceber_codigo = "*SELECT* 2_1".codigo) AND (contasareceber_codigo IS NOT NULL))
  • Heap Fetches: 0
60. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,109.22..1,109.22 rows=14,622 width=30) (never executed)

61. 0.000 0.000 ↓ 0.0 0

Seq Scan on clientes c_1 (cost=0.00..1,109.22 rows=14,622 width=30) (never executed)

62. 0.000 0.000 ↓ 0.0 0

Index Scan using contasareceber_situacao_pkey on contasareceber_situacao cr_sit_1 (cost=0.42..6.39 rows=1 width=8) (never executed)

  • Index Cond: ("*SELECT* 2_1".codigo = contasareceber_codigo)
63. 0.000 0.000 ↓ 0.0 0

Index Scan using situacoescontas_pkey on situacoescontas sc_1 (cost=0.15..0.17 rows=1 width=125) (never executed)

  • Index Cond: (cr_sit_1.situacoesconta_codigo = codigo)
64. 0.000 0.000 ↓ 0.0 0

Index Scan using gruposcontas_pkey on gruposcontas grct_1 (cost=0.15..0.18 rows=1 width=122) (never executed)

  • Index Cond: (codigo = "*SELECT* 2_1".gruposcontas_codigo)
65. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.21..1.21 rows=21 width=82) (never executed)

66. 0.000 0.000 ↓ 0.0 0

Seq Scan on tipodocumento t_2 (cost=0.00..1.21 rows=21 width=82) (never executed)

67. 0.000 0.000 ↓ 0.0 0

Index Scan using saidasnf_codigo_index on saidasnf snf (cost=0.42..5.47 rows=1 width=12) (never executed)

  • Index Cond: (codigo = "*SELECT* 2_1".saidasnf_codigo)
68. 0.003 4.999 ↑ 3,087.6 10 1

Subquery Scan on *SELECT* 3 (cost=43,727.86..52,428.76 rows=30,876 width=446) (actual time=4.931..4.999 rows=10 loops=1)

69. 0.205 4.996 ↑ 3,087.6 10 1

Merge Right Join (cost=43,727.86..52,120.00 rows=30,876 width=538) (actual time=4.930..4.996 rows=10 loops=1)

  • Merge Cond: (cat.contasareceber_avulsas_codigo = "*SELECT* 3_1".contasareceber_avulsas_codigo)
70. 0.006 0.010 ↑ 390.0 2 1

Sort (cost=55.27..57.22 rows=780 width=8) (actual time=0.009..0.010 rows=2 loops=1)

  • Sort Key: cat.contasareceber_avulsas_codigo
  • Sort Method: quicksort Memory: 25kB
71. 0.004 0.004 ↑ 390.0 2 1

Seq Scan on contasareceber_avulsas_tecnicos cat (cost=0.00..17.80 rows=780 width=8) (actual time=0.003..0.004 rows=2 loops=1)

72. 0.004 4.781 ↑ 879.7 9 1

Materialize (cost=43,672.59..43,821.29 rows=7,917 width=438) (actual time=4.772..4.781 rows=9 loops=1)

73. 0.007 4.777 ↑ 989.6 8 1

Merge Left Join (cost=43,672.59..43,801.50 rows=7,917 width=438) (actual time=4.771..4.777 rows=8 loops=1)

  • Merge Cond: ("*SELECT* 3_1".contasareceber_avulsas_codigo = cav.contasareceber_avulsas_codigo)
74. 0.023 4.746 ↑ 290.0 7 1

Sort (cost=43,617.33..43,622.40 rows=2,030 width=434) (actual time=4.745..4.746 rows=7 loops=1)

  • Sort Key: "*SELECT* 3_1".contasareceber_avulsas_codigo
  • Sort Method: quicksort Memory: 26kB
75. 0.005 4.723 ↑ 290.0 7 1

Nested Loop Left Join (cost=1,314.79..43,505.80 rows=2,030 width=434) (actual time=4.660..4.723 rows=7 loops=1)

76. 0.005 4.690 ↑ 290.0 7 1

Hash Left Join (cost=1,314.22..29,856.00 rows=2,030 width=309) (actual time=4.648..4.690 rows=7 loops=1)

  • Hash Cond: ("*SELECT* 3_1".tipodocumento_codigo = t_3.codigo)
77. 0.005 4.677 ↑ 290.0 7 1

Hash Left Join (cost=1,312.75..29,849.08 rows=2,030 width=231) (actual time=4.637..4.677 rows=7 loops=1)

  • Hash Cond: ("*SELECT* 3_1".gruposcontas_codigo = grct_2.codigo)
78. 0.012 4.669 ↑ 290.0 7 1

Hash Left Join (cost=1,292.85..29,823.80 rows=2,030 width=113) (actual time=4.629..4.669 rows=7 loops=1)

  • Hash Cond: ("*SELECT* 3_1".clientes_codigo = c_2.codigo)
79. 0.006 0.067 ↑ 290.0 7 1

Nested Loop (cost=0.85..28,526.48 rows=2,030 width=87) (actual time=0.030..0.067 rows=7 loops=1)

80. 0.002 0.047 ↑ 290.0 7 1

Append (cost=0.42..14,791.13 rows=2,030 width=87) (actual time=0.025..0.047 rows=7 loops=1)

81. 0.001 0.045 ↑ 290.0 7 1

Subquery Scan on *SELECT* 3_1 (cost=0.42..14,780.98 rows=2,030 width=87) (actual time=0.025..0.045 rows=7 loops=1)

82. 0.010 0.044 ↑ 290.0 7 1

Nested Loop (cost=0.42..14,760.68 rows=2,030 width=168) (actual time=0.024..0.044 rows=7 loops=1)

83. 0.020 0.020 ↑ 290.0 7 1

Seq Scan on contasareceber_avulsas crav (cost=0.00..30.40 rows=2,030 width=12) (actual time=0.018..0.020 rows=7 loops=1)

  • Filter: (codigo IS NOT NULL)
84. 0.014 0.014 ↑ 1.0 1 7

Index Scan using contasareceber_pkey1 on contasareceber cr_2 (cost=0.42..7.26 rows=1 width=35) (actual time=0.002..0.002 rows=1 loops=7)

  • Index Cond: (codigo = crav.contasareceber_codigo)
85. 0.014 0.014 ↑ 1.0 1 7

Index Only Scan using contasareceber_faturamentos_pkey on contasareceber_faturamentos cr_fat_2 (cost=0.42..6.77 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=7)

  • Index Cond: ((contasareceber_codigo = "*SELECT* 3_1".codigo) AND (contasareceber_codigo IS NOT NULL))
  • Heap Fetches: 7
86. 1.872 4.590 ↑ 1.0 14,622 1

Hash (cost=1,109.22..1,109.22 rows=14,622 width=30) (actual time=4.590..4.590 rows=14,622 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 1036kB
87. 2.718 2.718 ↑ 1.0 14,622 1

Seq Scan on clientes c_2 (cost=0.00..1,109.22 rows=14,622 width=30) (actual time=0.003..2.718 rows=14,622 loops=1)

88. 0.000 0.003 ↓ 0.0 0 1

Hash (cost=14.40..14.40 rows=440 width=122) (actual time=0.003..0.003 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
89. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on gruposcontas grct_2 (cost=0.00..14.40 rows=440 width=122) (actual time=0.003..0.003 rows=0 loops=1)

90. 0.003 0.008 ↓ 1.0 22 1

Hash (cost=1.21..1.21 rows=21 width=82) (actual time=0.008..0.008 rows=22 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
91. 0.005 0.005 ↓ 1.0 22 1

Seq Scan on tipodocumento t_3 (cost=0.00..1.21 rows=21 width=82) (actual time=0.003..0.005 rows=22 loops=1)

92. 0.007 0.028 ↑ 1.0 1 7

Nested Loop Left Join (cost=0.57..6.71 rows=1 width=129) (actual time=0.004..0.004 rows=1 loops=7)

93. 0.014 0.014 ↑ 1.0 1 7

Index Scan using contasareceber_situacao_pkey on contasareceber_situacao cr_sit_2 (cost=0.42..6.55 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=7)

  • Index Cond: ("*SELECT* 3_1".codigo = contasareceber_codigo)
94. 0.007 0.007 ↑ 1.0 1 7

Index Scan using situacoescontas_pkey on situacoescontas sc_2 (cost=0.15..0.17 rows=1 width=125) (actual time=0.001..0.001 rows=1 loops=7)

  • Index Cond: (cr_sit_2.situacoesconta_codigo = codigo)
95. 0.004 0.024 ↑ 97.5 8 1

Sort (cost=55.27..57.22 rows=780 width=8) (actual time=0.023..0.024 rows=8 loops=1)

  • Sort Key: cav.contasareceber_avulsas_codigo
  • Sort Method: quicksort Memory: 25kB
96. 0.020 0.020 ↑ 97.5 8 1

Seq Scan on contasareceber_avulsas_vendedores cav (cost=0.00..17.80 rows=780 width=8) (actual time=0.003..0.020 rows=8 loops=1)

97. 0.006 0.014 ↑ 1.0 39 1

Hash (cost=2.39..2.39 rows=39 width=13) (actual time=0.013..0.014 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
98. 0.008 0.008 ↑ 1.0 39 1

Seq Scan on vendedores v (cost=0.00..2.39 rows=39 width=13) (actual time=0.003..0.008 rows=39 loops=1)

99. 0.006 194.818 ↑ 16,460.6 49 1

Materialize (cost=110,940.41..114,973.25 rows=806,569 width=12) (actual time=194.811..194.818 rows=49 loops=1)

100. 103.275 194.812 ↑ 16,460.6 49 1

Sort (cost=110,940.41..112,956.83 rows=806,569 width=12) (actual time=194.809..194.812 rows=49 loops=1)

  • Sort Key: crpg.contasareceber_faturamentos_cr_codigo
  • Sort Method: external merge Disk: 17432kB
101. 91.537 91.537 ↑ 1.0 806,569 1

Seq Scan on contasareceber_pagtos crpg (cost=0.00..18,023.69 rows=806,569 width=12) (actual time=0.044..91.537 rows=806,569 loops=1)

102. 0.000 0.000 ↓ 0.0 0 50

Index Scan using tecnicos_pkey on tecnicos t (cost=0.14..0.16 rows=1 width=122) (actual time=0.000..0.000 rows=0 loops=50)

  • Index Cond: (codigo = "*SELECT* 1".tecnicos_codigo)
Planning time : 9.947 ms
Execution time : 11,637.152 ms