File: tpcb-problem-fixed.html

package info (click to toggle)
plprofiler 4.2.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 944 kB
  • sloc: python: 2,125; ansic: 1,440; perl: 670; sql: 357; sh: 55; makefile: 28
file content (874 lines) | stat: -rw-r--r-- 31,034 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
<html>
<head>
  <title>PL Profiler Report for tpcb-problem-fixed</title>

  <script language="javascript">
    // ----
    // toggle_div()
    //
    //  JS function to toggle one of the functions to show/block.
    // ----
    function toggle_div(hs_id, div_id) {
        var h_elem = document.getElementById(hs_id);
        var d_elem = document.getElementById(div_id);
        if (d_elem.style.display == "block") {
            d_elem.style.display = "none";
            h_elem.innerHTML = "show";
        } else {
            d_elem.style.display = "block";
            h_elem.innerHTML = "hide";
        }
    }

    // ----
    // set_stat_bars()
    // ----
    function set_stat_bars() {
        // Loop over all tables that are of linestats class.
        var tbls = document.getElementsByClassName("linestats");
        for (var i = 0; i < tbls.length; i++) {
            tbl = tbls[i];
            rws = tbl.rows;

            // Get the function level totals of the counters from the
            // second row (the pseudo line-0 row).
            vals = rws[1].getElementsByTagName("td");
            var exec_max = parseFloat(vals[1].innerHTML)
            var total_max = parseFloat(vals[2].innerHTML)
            var longest_max = parseFloat(vals[3].innerHTML)

            // Guard against division by zero errors.
            if (exec_max == 0) exec_max = 1;
            if (total_max == 0) total_max = 1;
            if (longest_max == 0) longest_max = 1;

            // Now we can calculate and set the bars relative to those
            // function level totals.
            for (var j = 1; j < rws.length; j++) {
                var vals = rws[j].getElementsByTagName("td");

                var val = parseFloat(vals[1].innerHTML)
                // var pct = val / exec_max * 100;
                // vals[1].style.backgroundSize = pct + "% 100%";
                // vals[1].style.backgroundSize = "0% 100%";
                vals[1].innerHTML = "<code>" + val.toLocaleString() + "</code>";

                val = parseFloat(vals[2].innerHTML)
                pct = val / total_max * 100;
                pct_str = "(" + pct.toFixed(2) + "%)"
                var need_spc = 10 - pct_str.length;
                for (var k = 0; k < need_spc; k++) {
                    pct_str = "&nbsp;" + pct_str;
                }
                vals[2].style.backgroundSize = pct + "% 100%";
                vals[2].innerHTML = "<code>" + val.toLocaleString() + "&nbsp;&micro;s" + pct_str + "</code>";

                val = parseFloat(vals[3].innerHTML)
                // pct = val / longest_max * 100;
                // vals[3].style.backgroundSize = pct + "% 100%";
                vals[3].innerHTML = "<code>" + val.toLocaleString() + "&nbsp;&micro;s" + "</code>";
            }
        }
    }
  </script>


  <style>
    h1,h2,h3,h4	{ color:#2222AA;
                }

    h1		{ font-family: Helvetica,Arial;
                  font-weight: 700;
                  font-size: 24pt;
                }

    h2		{ font-family: Helvetica,Arial;
                  font-weight: 700;
                  font-size: 18pt;
                }

    h3,h4	{ font-family: Helvetica,Arial;
                  font-weight: 700;
                  font-size: 16pt;
                }

    p,li,dt,dd	{ font-family: Helvetica,Arial;
                  font-size: 14pt;
                }

    pre		{ font-family: Courier,Fixed;
                  font-size: 14pt;
                }

    samp	{ font-family: Courier,Fixed;
                  font-weight: 900;
                  font-size: 14pt;
                }

    big		{ font-weight: 900;
                  font-size: 120%;
                }

    .bar        { background-color: white;
                  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AYEDho2r7uRnQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAFUlEQVQI12P8dlOcARtgYsABBqcEAH/aAfYx26o/AAAAAElFTkSuQmCC);
                  background-repeat: no-repeat;
                }
  </style>

</head>
<body bgcolor="#ffffff" onload="set_stat_bars()">
<h1>PL Profiler Report for tpcb-problem-fixed</h1>
<h2>PL/pgSQL Call Graph</h2>
<center>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" width="800" height="130" onload="init(evt)" viewBox="0 0 800 130" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs >
	<linearGradient id="background" y1="0" y2="1" x1="0" x2="0" >
		<stop stop-color="#eeeeee" offset="5%" />
		<stop stop-color="#eeeeb0" offset="95%" />
	</linearGradient>
</defs>
<style type="text/css">
	.func_g:hover { stroke:black; stroke-width:0.5; cursor:pointer; }
</style>
<script type="text/ecmascript">
<![CDATA[
	var details, svg;
	function init(evt) { 
		details = document.getElementById("details").firstChild; 
		svg = document.getElementsByTagName("svg")[0];
	}
	function s(info) { details.nodeValue = "Function: " + info; }
	function c() { details.nodeValue = ' '; }
	function find_child(parent, name, attr) {
		var children = parent.childNodes;
		for (var i=0; i<children.length;i++) {
			if (children[i].tagName == name)
				return (attr != undefined) ? children[i].attributes[attr].value : children[i];
		}
		return;
	}
	function orig_save(e, attr, val) {
		if (e.attributes["_orig_"+attr] != undefined) return;
		if (e.attributes[attr] == undefined) return;
		if (val == undefined) val = e.attributes[attr].value;
		e.setAttribute("_orig_"+attr, val);
	}
	function orig_load(e, attr) {
		if (e.attributes["_orig_"+attr] == undefined) return;
		e.attributes[attr].value = e.attributes["_orig_"+attr].value;
		e.removeAttribute("_orig_"+attr);
	}
	function update_text(e) {
		var r = find_child(e, "rect");
		var t = find_child(e, "text");
		var w = parseFloat(r.attributes["width"].value) -3;
		var txt = find_child(e, "title").textContent.replace(/\([^(]*\)/,"");
		t.attributes["x"].value = parseFloat(r.attributes["x"].value) +3;
		
		// Smaller than this size won't fit anything
		if (w < 2*12*0.59) {
			t.textContent = "";
			return;
		}
		
		t.textContent = txt;
		// Fit in full text width
		if (/^ *$/.test(txt) || t.getSubStringLength(0, txt.length) < w)
			return;
		
		for (var x=txt.length-2; x>0; x--) {
			if (t.getSubStringLength(0, x+2) <= w) { 
				t.textContent = txt.substring(0,x) + "..";
				return;
			}
		}
		t.textContent = "";
	}
	function zoom_reset(e) {
		if (e.attributes != undefined) {
			orig_load(e, "x");
			orig_load(e, "width");
		}
		if (e.childNodes == undefined) return;
		for(var i=0, c=e.childNodes; i<c.length; i++) {
			zoom_reset(c[i]);
		}
	}
	function zoom_child(e, x, ratio) {
		if (e.attributes != undefined) {
			if (e.attributes["x"] != undefined) {
				orig_save(e, "x");
				e.attributes["x"].value = (parseFloat(e.attributes["x"].value) - x - 10) * ratio + 10;
				if(e.tagName == "text") e.attributes["x"].value = find_child(e.parentNode, "rect", "x") + 3;
			}
			if (e.attributes["width"] != undefined) {
				orig_save(e, "width");
				e.attributes["width"].value = parseFloat(e.attributes["width"].value) * ratio;
			}
		}
		
		if (e.childNodes == undefined) return;
		for(var i=0, c=e.childNodes; i<c.length; i++) {
			zoom_child(c[i], x-10, ratio);
		}
	}
	function zoom_parent(e) {
		if (e.attributes) {
			if (e.attributes["x"] != undefined) {
				orig_save(e, "x");
				e.attributes["x"].value = 10;
			}
			if (e.attributes["width"] != undefined) {
				orig_save(e, "width");
				e.attributes["width"].value = parseInt(svg.width.baseVal.value) - (10*2);
			}
		}
		if (e.childNodes == undefined) return;
		for(var i=0, c=e.childNodes; i<c.length; i++) {
			zoom_parent(c[i]);
		}
	}
	function zoom(node) { 
		var attr = find_child(node, "rect").attributes;
		var width = parseFloat(attr["width"].value);
		var xmin = parseFloat(attr["x"].value);
		var xmax = parseFloat(xmin + width);
		var ymin = parseFloat(attr["y"].value);
		var ratio = (svg.width.baseVal.value - 2*10) / width;
		
		// XXX: Workaround for JavaScript float issues (fix me)
		var fudge = 0.0001;
		
		var unzoombtn = document.getElementById("unzoom");
		unzoombtn.style["opacity"] = "1.0";
		
		var el = document.getElementsByTagName("g");
		for(var i=0;i<el.length;i++){
			var e = el[i];
			var a = find_child(e, "rect").attributes;
			var ex = parseFloat(a["x"].value);
			var ew = parseFloat(a["width"].value);
			// Is it an ancestor
			if (0 == 0) {
				var upstack = parseFloat(a["y"].value) > ymin;
			} else {
				var upstack = parseFloat(a["y"].value) < ymin;
			}
			if (upstack) {
				// Direct ancestor
				if (ex <= xmin && (ex+ew+fudge) >= xmax) {
					e.style["opacity"] = "0.5";
					zoom_parent(e);
					e.onclick = function(e){unzoom(); zoom(this);};
					update_text(e);
				}
				// not in current path
				else
					e.style["display"] = "none";
			}
			// Children maybe
			else {
				// no common path
				if (ex < xmin || ex + fudge >= xmax) {
					e.style["display"] = "none";
				}
				else {
					zoom_child(e, xmin, ratio);
					e.onclick = function(e){zoom(this);};
					update_text(e);
				}
			}
		}
	}
	function unzoom() {
		var unzoombtn = document.getElementById("unzoom");
		unzoombtn.style["opacity"] = "0.0";
		
		var el = document.getElementsByTagName("g");
		for(i=0;i<el.length;i++) {
			el[i].style["display"] = "block";
			el[i].style["opacity"] = "1";
			zoom_reset(el[i]);
			update_text(el[i]);
		}
	}	
]]>
</script>
<rect x="0.0" y="0" width="800.0" height="130.0" fill="url(#background)"  />
<text text-anchor="middle" x="400.00" y="24" font-size="17" font-family="Verdana" fill="rgb(0,0,0)"  >PL Profiler Report for tpcb-problem-fixed</text>
<text text-anchor="" x="10.00" y="113" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="details" > </text>
<text text-anchor="" x="10.00" y="24" font-size="12" font-family="Verdana" fill="rgb(0,0,0)" id="unzoom" onclick="unzoom()" style="opacity:0.0;cursor:pointer" >Reset Zoom</text>
<g class="func_g" onmouseover="s('public.tpcb_upd_branches() oid=66240 (81,747,512 samples, 28.58%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_upd_branches() oid=66240 (81,747,512 samples, 28.58%)</title><rect x="33.9" y="49" width="223.0" height="15.0" fill="rgb(247,162,28)" rx="2" ry="2" />
<text text-anchor="" x="36.94" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >public.tpcb_upd_branches() oi..</text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_fetch_abalance() oid=66446 (1,248,733 samples, 0.44%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_fetch_abalance() oid=66446 (1,248,733 samples, 0.44%)</title><rect x="30.5" y="33" width="3.4" height="15.0" fill="rgb(220,109,7)" rx="2" ry="2" />
<text text-anchor="" x="33.53" y="43.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_upd_tellers() oid=66239 (195,487,118 samples, 68.35%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_upd_tellers() oid=66239 (195,487,118 samples, 68.35%)</title><rect x="256.9" y="49" width="533.1" height="15.0" fill="rgb(224,156,6)" rx="2" ry="2" />
<text text-anchor="" x="259.87" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >public.tpcb_upd_tellers() oid=66239</text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_upd_accounts() oid=66238 (4,335,474 samples, 1.52%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_upd_accounts() oid=66238 (4,335,474 samples, 1.52%)</title><rect x="22.1" y="49" width="11.8" height="15.0" fill="rgb(249,68,31)" rx="2" ry="2" />
<text text-anchor="" x="25.11" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
<g class="func_g" onmouseover="s('all (286,011,539 samples, 100%)')" onmouseout="c()" onclick="zoom(this)">
<title>all (286,011,539 samples, 100%)</title><rect x="10.0" y="81" width="780.0" height="15.0" fill="rgb(254,53,34)" rx="2" ry="2" />
<text text-anchor="" x="13.00" y="91.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
<g class="func_g" onmouseover="s('public.tpcb() oid=66237 (286,011,539 samples, 100.00%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb() oid=66237 (286,011,539 samples, 100.00%)</title><rect x="10.0" y="65" width="780.0" height="15.0" fill="rgb(245,18,47)" rx="2" ry="2" />
<text text-anchor="" x="13.00" y="75.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  >public.tpcb() oid=66237</text>
</g>
<g class="func_g" onmouseover="s('public.tpcb_ins_history() oid=66241 (1,150,113 samples, 0.40%)')" onmouseout="c()" onclick="zoom(this)">
<title>public.tpcb_ins_history() oid=66241 (1,150,113 samples, 0.40%)</title><rect x="19.0" y="49" width="3.1" height="15.0" fill="rgb(218,110,41)" rx="2" ry="2" />
<text text-anchor="" x="21.98" y="59.5" font-size="12" font-family="Verdana" fill="rgb(0,0,0)"  ></text>
</g>
</svg>

</center>
<h2>List of functions detailed below</h2>
<ul>
<li><a href="#A66237">public.tpcb() oid=66237</a></li>
<li><a href="#A66446">public.tpcb_fetch_abalance() oid=66446</a></li>
<li><a href="#A66241">public.tpcb_ins_history() oid=66241</a></li>
<li><a href="#A66238">public.tpcb_upd_accounts() oid=66238</a></li>
<li><a href="#A66240">public.tpcb_upd_branches() oid=66240</a></li>
<li><a href="#A66239">public.tpcb_upd_tellers() oid=66239</a></li>
</ul>
<h2>All 6 functions (by self_time)</h2>
<a name="A66239" />
<h3>Function public.tpcb_upd_tellers() oid=66239 (<a id="toggle_66239"
                href="javascript:toggle_div('toggle_66239', 'div_66239')">show</a>)</h3>
<p>
self_time = 195,487,118 &micro;s<br/>
total_time = 195,487,118 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_upd_tellers&nbsp;</code></b></td>
    <td><b><code>(par_tid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;void</code></b>
    </td>
  </tr>
</table>
<div id="div_66239" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">195487118</td>
    <td align="right">147832</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">195377945</td>
    <td align="right">147823</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;UPDATE&nbsp;pgbench_tellers&nbsp;SET&nbsp;tbalance&nbsp;=&nbsp;tbalance&nbsp;+&nbsp;par_delta</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;tid&nbsp;=&nbsp;par_tid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66240" />
<h3>Function public.tpcb_upd_branches() oid=66240 (<a id="toggle_66240"
                href="javascript:toggle_div('toggle_66240', 'div_66240')">show</a>)</h3>
<p>
self_time = 81,747,512 &micro;s<br/>
total_time = 81,747,512 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_upd_branches&nbsp;</code></b></td>
    <td><b><code>(par_bid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;void</code></b>
    </td>
  </tr>
</table>
<div id="div_66240" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">81747512</td>
    <td align="right">21177</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">81639402</td>
    <td align="right">21174</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;UPDATE&nbsp;pgbench_branches&nbsp;SET&nbsp;bbalance&nbsp;=&nbsp;bbalance&nbsp;+&nbsp;par_delta</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;bid&nbsp;=&nbsp;par_bid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66237" />
<h3>Function public.tpcb() oid=66237 (<a id="toggle_66237"
                href="javascript:toggle_div('toggle_66237', 'div_66237')">show</a>)</h3>
<p>
self_time = 3,291,322 &micro;s<br/>
total_time = 286,005,315 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb&nbsp;</code></b></td>
    <td><b><code>(par_aid integer,<br/>&nbsp;par_bid integer,<br/>&nbsp;par_tid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;integer</code></b>
    </td>
  </tr>
</table>
<div id="div_66237" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">286005315</td>
    <td align="right">148867</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>DECLARE</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;var_abalance&nbsp;&nbsp;&nbsp;&nbsp;integer;</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">4817079</td>
    <td align="right">13903</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;var_abalance&nbsp;=&nbsp;tpcb_upd_accounts(par_aid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">196304468</td>
    <td align="right">147862</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;PERFORM&nbsp;tpcb_upd_tellers(par_tid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>7</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">82688022</td>
    <td align="right">21202</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;PERFORM&nbsp;tpcb_upd_branches(par_bid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>8</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">2048015</td>
    <td align="right">888</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;PERFORM&nbsp;tpcb_ins_history(par_aid,&nbsp;par_tid,&nbsp;par_bid,&nbsp;par_delta);</code></td>
  </tr>
  <tr>
    <td align="right"><code>9</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">10028</td>
    <td align="right">77</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURN&nbsp;var_abalance;</code></td>
  </tr>
  <tr>
    <td align="right"><code>10</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>11</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66238" />
<h3>Function public.tpcb_upd_accounts() oid=66238 (<a id="toggle_66238"
                href="javascript:toggle_div('toggle_66238', 'div_66238')">show</a>)</h3>
<p>
self_time = 3,086,741 &micro;s<br/>
total_time = 4,335,474 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_upd_accounts&nbsp;</code></b></td>
    <td><b><code>(par_aid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;integer</code></b>
    </td>
  </tr>
</table>
<div id="div_66238" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">4335474</td>
    <td align="right">13884</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">2512783</td>
    <td align="right">13813</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;UPDATE&nbsp;pgbench_accounts&nbsp;SET&nbsp;abalance&nbsp;=&nbsp;abalance&nbsp;+&nbsp;par_delta</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WHERE&nbsp;aid&nbsp;=&nbsp;par_aid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">1761205</td>
    <td align="right">1168</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURN&nbsp;tpcb_fetch_abalance(par_aid);</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>7</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66446" />
<h3>Function public.tpcb_fetch_abalance() oid=66446 (<a id="toggle_66446"
                href="javascript:toggle_div('toggle_66446', 'div_66446')">show</a>)</h3>
<p>
self_time = 1,248,733 &micro;s<br/>
total_time = 1,248,733 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_fetch_abalance&nbsp;</code></b></td>
    <td><b><code>(par_aid integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;integer</code></b>
    </td>
  </tr>
</table>
<div id="div_66446" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">1248733</td>
    <td align="right">1121</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>DECLARE</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;var_abalance&nbsp;&nbsp;&nbsp;&nbsp;integer;</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">44902</td>
    <td class="bar" align="right">1151844</td>
    <td align="right">1120</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURN&nbsp;abalance&nbsp;FROM&nbsp;pgbench_accounts&nbsp;WHERE&nbsp;aid&nbsp;=&nbsp;par_aid;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>7</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
<a name="A66241" />
<h3>Function public.tpcb_ins_history() oid=66241 (<a id="toggle_66241"
                href="javascript:toggle_div('toggle_66241', 'div_66241')">show</a>)</h3>
<p>
self_time = 1,150,113 &micro;s<br/>
total_time = 1,150,113 &micro;s
</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><b><code>public.tpcb_ins_history&nbsp;</code></b></td>
    <td><b><code>(par_aid integer,<br/>&nbsp;par_tid integer,<br/>&nbsp;par_bid integer,<br/>&nbsp;par_delta integer)</code></b></td>
  </tr>
  <tr>
    <td colspan="2">
      <b><code>&nbsp;&nbsp;&nbsp;&nbsp;RETURNS&nbsp;void</code></b>
    </td>
  </tr>
</table>
<div id="div_66241" style="display: none">
<center>
<table class="linestats" border="1" cellpadding="0" cellspacing="0" width="80%">
  <tr>
    <th width="10%">Line</th>
    <th width="10%">exec_count</th>
    <th width="10%">total_time</th>
    <th width="10%">longest_time</th>
    <th width="60%">Source Code</th>
  </tr>
  <tr>
    <td align="right"><code>0</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">1150113</td>
    <td align="right">860</td>
    <td align="left"><code><b>--&nbsp;Function&nbsp;Totals</b></code></td>
  </tr>
  <tr>
    <td align="right"><code>1</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
  <tr>
    <td align="right"><code>2</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>BEGIN</code></td>
  </tr>
  <tr>
    <td align="right"><code>3</code></td>
    <td align="right">44901</td>
    <td class="bar" align="right">1062122</td>
    <td align="right">858</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;INSERT&nbsp;INTO&nbsp;pgbench_history&nbsp;(tid,&nbsp;bid,&nbsp;aid,&nbsp;delta,&nbsp;mtime)</code></td>
  </tr>
  <tr>
    <td align="right"><code>4</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUES&nbsp;(par_tid,&nbsp;par_bid,&nbsp;par_aid,&nbsp;par_delta,&nbsp;CURRENT_TIMESTAMP);</code></td>
  </tr>
  <tr>
    <td align="right"><code>5</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code>END;</code></td>
  </tr>
  <tr>
    <td align="right"><code>6</code></td>
    <td align="right">0</td>
    <td class="bar" align="right">0</td>
    <td align="right">0</td>
    <td align="left"><code></code></td>
  </tr>
</table>
</center>
</div>
</body>
</html>