- Notifications
You must be signed in to change notification settings - Fork5
Commit184505b
committed
Attached is a patch that does the following:
1) improves performance of commit/rollback by reducing number of roundtrips to the server2) uses 7.1 functionality for setting the transaction isolation level3) backs out a patch from 11 days ago because that code failed tocompile under jdk1.1Details:1) The old code was doing the following for each commit: commit begin set transaction isolation level xxxthus a call to commit was performing three round trips to the database. The new code does this in one round trip as: commit; begin; set transaction isolation level xxxIn a simple test program that performs 1000 transactions (where eachtransaction does one simple select inside that transaction) has thefollowing before and after timings:Client and Server on same machineold new--- ---1.877sec 1.405sec 25.1% improvementClient and Server on different machinesold new--- ---4.184sec 2.927sec 34.3% improvement(all timings are an average of four different runs)2) The driver was using 'set transaction isolation level xxx' at thebegining of each transaction, instead of using the new 7.1 syntax of'set session characteristics as transaction isolation level xxx' whichonly needs to be done once instead of for each transaction. This isdone conditionally (i.e. if server is 7.0 or older do the old behaviour,else do the new behaviour) to not break backward compatibility. Thisalso required the movement of some code to check/test database versionnumbers from the DatabaseMetaData object to the Connection object.3) Finally while testing, I discovered that the code that was checked in 11 days ago actually didn't compile. The code in the patch forConnection.setCatalog() used Properties.setProperty() which only existsin JDK1.2 or higher. Thus compiling the JDBC1 driver failed as thismethod doesn't exist. Thus I backed out that patch.Barry Lind1 parentdad8e41 commit184505b
File tree
3 files changed
+112
-90
lines changed- src/interfaces/jdbc/org/postgresql
- jdbc1
- jdbc2
3 files changed
+112
-90
lines changedLines changed: 86 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 |
| |
41 | 44 |
| |
42 | 45 |
| |
| |||
262 | 265 |
| |
263 | 266 |
| |
264 | 267 |
| |
265 |
| - | |
| 268 | + | |
266 | 269 |
| |
267 | 270 |
| |
268 | 271 |
| |
269 | 272 |
| |
270 | 273 |
| |
271 |
| - | |
| 274 | + | |
272 | 275 |
| |
273 | 276 |
| |
274 | 277 |
| |
275 | 278 |
| |
276 |
| - | |
| 279 | + | |
| 280 | + | |
277 | 281 |
| |
278 | 282 |
| |
279 | 283 |
| |
| |||
904 | 908 |
| |
905 | 909 |
| |
906 | 910 |
| |
907 |
| - | |
908 |
| - | |
| 911 | + | |
909 | 912 |
| |
910 | 913 |
| |
911 | 914 |
| |
| |||
934 | 937 |
| |
935 | 938 |
| |
936 | 939 |
| |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
| 940 | + | |
942 | 941 |
| |
943 | 942 |
| |
944 | 943 |
| |
| |||
952 | 951 |
| |
953 | 952 |
| |
954 | 953 |
| |
955 |
| - | |
956 |
| - | |
957 |
| - | |
958 |
| - | |
959 |
| - | |
| 954 | + | |
960 | 955 |
| |
961 | 956 |
| |
962 | 957 |
| |
| |||
988 | 983 |
| |
989 | 984 |
| |
990 | 985 |
| |
991 |
| - | |
| 986 | + | |
992 | 987 |
| |
993 | 988 |
| |
994 | 989 |
| |
| |||
999 | 994 |
| |
1000 | 995 |
| |
1001 | 996 |
| |
1002 |
| - | |
1003 |
| - | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1004 | 1026 |
| |
1005 | 1027 |
| |
1006 | 1028 |
| |
1007 | 1029 |
| |
1008 |
| - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
1009 | 1036 |
| |
1010 |
| - | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1011 | 1043 |
| |
1012 | 1044 |
| |
1013 | 1045 |
| |
1014 | 1046 |
| |
1015 |
| - | |
1016 |
| - | |
| 1047 | + | |
| 1048 | + | |
1017 | 1049 |
| |
1018 | 1050 |
| |
1019 |
| - | |
1020 |
| - | |
| 1051 | + | |
| 1052 | + | |
1021 | 1053 |
| |
1022 | 1054 |
| |
1023 | 1055 |
| |
1024 | 1056 |
| |
| 1057 | + | |
1025 | 1058 |
| |
1026 | 1059 |
| |
1027 | 1060 |
| |
| |||
1033 | 1066 |
| |
1034 | 1067 |
| |
1035 | 1068 |
| |
1036 |
| - | |
1037 |
| - | |
1038 |
| - | |
1039 |
| - | |
1040 |
| - | |
1041 |
| - | |
1042 |
| - | |
| 1069 | + | |
1043 | 1070 |
| |
1044 | 1071 |
| |
1045 | 1072 |
| |
| |||
1095 | 1122 |
| |
1096 | 1123 |
| |
1097 | 1124 |
| |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1098 | 1151 |
| |
| 1152 | + |
Lines changed: 13 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 | 50 |
| |
60 | 51 |
| |
61 | 52 |
| |
| |||
126 | 117 |
| |
127 | 118 |
| |
128 | 119 |
| |
129 |
| - | |
| 120 | + | |
130 | 121 |
| |
131 | 122 |
| |
132 | 123 |
| |
| |||
159 | 150 |
| |
160 | 151 |
| |
161 | 152 |
| |
162 |
| - | |
| 153 | + | |
163 | 154 |
| |
164 | 155 |
| |
165 | 156 |
| |
| |||
182 | 173 |
| |
183 | 174 |
| |
184 | 175 |
| |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
| 176 | + | |
193 | 177 |
| |
194 | 178 |
| |
195 | 179 |
| |
| |||
558 | 542 |
| |
559 | 543 |
| |
560 | 544 |
| |
561 |
| - | |
| 545 | + | |
562 | 546 |
| |
563 | 547 |
| |
564 | 548 |
| |
| |||
581 | 565 |
| |
582 | 566 |
| |
583 | 567 |
| |
584 |
| - | |
| 568 | + | |
585 | 569 |
| |
586 | 570 |
| |
587 | 571 |
| |
| |||
608 | 592 |
| |
609 | 593 |
| |
610 | 594 |
| |
611 |
| - | |
| 595 | + | |
612 | 596 |
| |
613 | 597 |
| |
614 | 598 |
| |
| |||
749 | 733 |
| |
750 | 734 |
| |
751 | 735 |
| |
752 |
| - | |
| 736 | + | |
753 | 737 |
| |
754 | 738 |
| |
755 | 739 |
| |
| |||
761 | 745 |
| |
762 | 746 |
| |
763 | 747 |
| |
764 |
| - | |
| 748 | + | |
765 | 749 |
| |
766 | 750 |
| |
767 | 751 |
| |
| |||
976 | 960 |
| |
977 | 961 |
| |
978 | 962 |
| |
979 |
| - | |
| 963 | + | |
980 | 964 |
| |
981 | 965 |
| |
982 | 966 |
| |
| |||
1053 | 1037 |
| |
1054 | 1038 |
| |
1055 | 1039 |
| |
1056 |
| - | |
| 1040 | + | |
1057 | 1041 |
| |
1058 | 1042 |
| |
1059 | 1043 |
| |
| |||
1075 | 1059 |
| |
1076 | 1060 |
| |
1077 | 1061 |
| |
1078 |
| - | |
| 1062 | + | |
1079 | 1063 |
| |
1080 | 1064 |
| |
1081 | 1065 |
| |
| |||
1303 | 1287 |
| |
1304 | 1288 |
| |
1305 | 1289 |
| |
1306 |
| - | |
| 1290 | + | |
1307 | 1291 |
| |
1308 | 1292 |
| |
1309 | 1293 |
| |
| |||
1329 | 1313 |
| |
1330 | 1314 |
| |
1331 | 1315 |
| |
1332 |
| - | |
| 1316 | + | |
1333 | 1317 |
| |
1334 | 1318 |
| |
1335 | 1319 |
| |
|
0 commit comments
Comments
(0)