{"id":181925,"date":"2020-10-26T18:11:54","date_gmt":"2020-10-26T10:11:54","guid":{"rendered":"http:\/\/4563.org\/?p=181925"},"modified":"2020-10-26T18:11:54","modified_gmt":"2020-10-26T10:11:54","slug":"for-%e5%be%aa%e7%8e%af%e4%b8%ad%e6%89%a7%e8%a1%8c-sql-%e8%af%ad%e5%8f%a5%ef%bc%8c%e4%b8%ba%e4%bb%80%e4%b9%88%e6%95%88%e7%8e%87%e4%bd%8e%e4%b8%8b%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=181925","title":{"rendered":"for \u5faa\u73af\u4e2d\u6267\u884c sql \u8bed\u53e5\uff0c\u4e3a\u4ec0\u4e48\u6548\u7387\u4f4e\u4e0b\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  for \u5faa\u73af\u4e2d\u6267\u884c sql \u8bed\u53e5\uff0c\u4e3a\u4ec0\u4e48\u6548\u7387\u4f4e\u4e0b\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zw1one <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4ee3\u7801\u9519\u8bef\u793a\u4f8b\uff08 java \uff09\uff1a<\/p>\n<pre><code>for(PO po : poList){   dao.insert(po); } <\/code><\/pre>\n<p>\u5df2\u7ecf\u7528\u6279\u91cf\u63d0\u4ea4 \/\u62fc\u63a5 insert \u8bed\u53e5\u7684\u65b9\u5f0f\u53bb\u9664\u4e86 for \u5faa\u73af\uff0c\u6548\u7387\u4e5f\u6b63\u5e38\u4e86\u3002\u4f46\u662f\u60f3\u95ee\u4e0b\uff0c\u5927\u5bb6\u90fd\u77e5\u9053\u8fd9\u79cd\u64cd\u4f5c\u5b83\u6548\u7387\u4f4e\uff0c\u53ef\u662f\u5b83\u5177\u4f53\u4f4e\u5728\u54ea\u5462\uff1f<\/p>\n<p>\u6211\u5927\u6982\u731c\u7684\u51e0\u4e2a\u70b9:<\/p>\n<ul>\n<li>\u591a\u6b21\u5efa\u7acb\u6570\u636e\u5e93\u94fe\u63a5\u8017\u65f6\uff08\u4f46\u662f\u6709\u8fde\u63a5\u6c60\u7ba1\u7406\u6548\u7387\u5e94\u8be5\u4e0d\u4f1a\u4f4e\uff1f\uff09<\/li>\n<li>\u591a\u6b21\u5f00\u542f\u5173\u95ed\u4e8b\u52a1\u8017\u65f6\uff08 service \u65b9\u6cd5\u58f0\u660e\u4e86\u53ea\u6709\u4e00\u4e2a\u4e8b\u52a1\uff09<\/li>\n<li>\u6570\u636e\u5e93\u591a\u6b21\u89e3\u6790\u540c\u4e00\u6761 sql \u8bed\u53e5\u8017\u65f6<\/li>\n<\/ul>\n<p>\u5404\u4f4d\u5927\u4f6c\uff0c\u54ea\u91cc\u6709\u53c2\u8003\u8d44\u6599\u4e4b\u7c7b\u7684\u53ef\u4ee5\u770b\u770b\u5417 : (<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>26<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3949437\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : biepin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6bcf\u6b21\u90fd\u8fdb\u884c insert \u64cd\u4f5c\uff0c\u6bcf\u6b21 insert \u64cd\u4f5c\u90fd\u662f\u9700\u8981\u82b1\u65f6\u95f4\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949438\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : misaka19000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7f51\u7edc\u5f00\u9500\u4e5f\u8981\u8003\u8651                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949439\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mazhan465 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6bcf\u6761 insert\uff0cDB \u90fd\u8981\u91cd\u65b0\u8d70\u4e00\u904d\u6574\u4e2a\u89e3\u6790\uff0c\u6570\u636e\u68c0\u67e5\uff0c\u5199\u5185\u5b58\uff0c\u5237\u76d8\uff0c\u4e00\u6761 insert \u63d2\u591a\u6761\u6570\u636e\u53ef\u4ee5\u4e00\u6b21\u5c06\u6570\u636e\u5199\u5230\u5185\u5b58\uff0c\u7136\u540e\u7b49\u5f85\u5237\u76d8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949440\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : a719031256 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3b\u8981\u5e94\u8be5\u662f\u7f51\u7edc\u5f00\u9500\u628a\uff0c\u6570\u636e\u5e93\u8ddf\u4ee3\u7801\u5728\u540c\u4e00\u670d\u52a1\u5668\u4e0a\u6548\u7387\u8ddf\u6279\u91cf\u63d2\u5165\u4e0d\u76f8\u4e0a\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949441\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chendy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6548\u7387\u4f4e\u4e0b\u662f\u76f8\u6bd4\u4e8e\u6279\u91cf\u64cd\u4f5c\u6548\u7387\u4f4e\u4e0b\uff0c\u5faa\u73af\u8981\u8bbf\u95ee n \u6b21\u6570\u636e\u5e93\uff0c\u6279\u91cf\u5c31 1 \u6b21                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949442\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zw1one <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @a719031256 \u7f51\u7edc\u5f00\u9500\u6307\u7684\u662f\uff1a\u4f20\u8f93\u8fd9\u4e9b\u63d2\u5165\u7684\u6570\u636e\u5417\uff1f\u8fd8\u662f\u4e0e\u6570\u636e\u5e93\u5efa\u7acb\u94fe\u63a5\u4e5f\u6709\u7f51\u7edc\u5f00\u9500\uff1f\u56e0\u4e3a\u8981\u63d2\u5165\u7684\u6570\u636e\u603b\u91cf\u662f\u4e0d\u53d8\u7684\uff0c\u4e24\u79cd\u505a\u6cd5\u7684\u7f51\u7edc\u5f00\u9500\u662f\u4e0d\u662f\u5dee\u4e0d\u591a\u5462\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949443\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JaguarJack <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5e94\u8be5\u662f insert \u8fd9\u4e2a\u5de5\u4f5c\u91cd\u590d\u505a\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949444\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : a719031256 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zw1one \u4f20\u8f93\u6570\u636e\u7684\u7f51\u7edc\u5f00\u9500                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949445\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : HanMeiM <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd8\u6709\u8868\u91cc\u6709\u7d22\u5f15\u7684\u8bdd\uff0c\u6bcf\u6b21 insert \u662f\u4f1a\u91cd\u5efa\u7d22\u5f15\u6811\u7684\uff0c\u8fd9\u4e2a\u8fd8\u662f\u633a\u9ebb\u70e6\u7684\u3002 <br \/>\u7528 foreach \u6700\u597d\u5f00\u4e2a\u4e8b\u52a1\uff0c\u4e00\u6b21\u6027\u63d0\u4e0a\u53bb                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949446\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : AngryPanda <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             TCP \u8fde\u63a5\u5c31\u4e00\u6b21\uff0c\u5e76\u6ca1\u6709\u591a\u6b21\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949447\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : QBugHunter <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6570\u636e\u5e93\u672c\u8d28\u4e0a\u6765\u8bf4\u662f\u4e00\u79cd\u8bfb\u5199\u672c\u5730\u6587\u4ef6\uff0c\u7136\u540e\uff0c\u73b0\u5728\u6709 10 \u4e2a\u5b57\u7b26\u9700\u8981\u5199\u5165\u672c\u5730\u6587\u4ef6<br \/>\u65b9\u6848 A\uff1a\u6253\u5f00\u6587\u4ef6\uff0c\u5199\u5165\u4e00\u4e2a\u5b57\u7b26\uff0c\u5173\u95ed\u6587\u4ef6\u3002\u7136\u540e\u628a\u8be5\u8fc7\u7a0b\u91cd\u590d 10 \u6b64<br \/>\u65b9\u6848 B\uff1a\u6253\u5f00\u6587\u4ef6\uff0c\u5199\u5165 10 \u4e2a\u5b57\u7b26\uff0c\u5173\u95ed\u6587\u4ef6<\/p>\n<p>\u57fa\u672c\u4e0a\u5c31\u662f\u8fd9\u4e2a\u6837\u5b50                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949448\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chenluo0429 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e4b\u524d\u77ed\u6682\u7ef4\u62a4\u8fc7\u4e00\u5ea7\u5c4e\u5c71\uff0c\u5e73\u677f\u79bb\u7ebf\u5f55\u5165\u6570\u636e\uff0c\u7136\u540e\u5c06\u6570\u636e\u6253\u5305\u6210\u6587\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\uff0c\u670d\u52a1\u5668\u89e3\u6790\u672c\u673a\u7684\u6587\u4ef6\uff0c\u5199\u5165\u672c\u673a\u6570\u636e\u5e93\uff0c\u7136\u540e\u8bf7\u6c42\u8fd4\u56de\u6210\u529f\u3002\u56e0\u4e3a\u5728 for \u5faa\u73af\u91cc\u9762\u6bcf\u6b21\u53ea\u5199\u5165\u4e00\u6761\u6570\u636e\uff0c\u5355\u6b21 insert \u5927\u6982\u5728 10-20ms \u3002\u5f88\u4e45\u6ca1\u4e0a\u4f20\u7684\u5e73\u677f\u6570\u636e\u91cf\u5de8\u5927\uff0c\u5927\u6982\u9700\u8981\u4e0a\u4f20\u4e09\u5929\uff0c\u6240\u4ee5\u603b\u662f\u8d85\u65f6\u65e0\u6cd5\u4e0a\u4f20\u6210\u529f\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949449\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : l00t <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u5f97\u770b\u4f60\u7a0b\u5e8f\u672c\u8eab\u548c\u6570\u636e\u5e93\u4ea4\u4e92\u7684\u90e8\u5206\u662f\u600e\u4e48\u5199\u7684\u3002for \u4e0d\u662f\u5173\u952e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949450\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yeqizhang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ea\u80fd\u8bf4\u7f51\u7edc\u5f00\u9500\uff0c\u4f60\u4e0d\u53ef\u80fd for \u91cc\u9762\u6bcf\u6b21 insert \u524d connect \u7136\u540e close \u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949451\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Bromine0x23 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6761\u6570\u591a\u7684\u8bdd\u5c31\u4e3b\u8981\u662f\u7b49\u5f85\u54cd\u5e94\u7684\u4f20\u64ad\u65f6\u5ef6\u4e86<br \/>\u975e\u6279\u91cf\u6a21\u5f0f\u4e0b\uff0c\u8981\u7b49\u5f85\u524d\u4e00\u6761\u6267\u884c\u7684\u7ed3\u679c\u54cd\u5e94\u4f20\u8f93\u56de\u6765\u624d\u80fd\u6267\u884c\u4e0b\u4e00\u6761\uff0c\u90a3\u5c31\u591a\u4e86 (N-1) \u4e2a\u4f20\u64ad\u65f6\u5ef6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949452\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Cuo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             N+1 \u95ee\u9898\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949453\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chanyan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b9e\u6d4b\u5728 pg \u91cc\u9762\uff0c\u666e\u901a\u4e1a\u52a1 10 \u4e07\u6570\u636e\u62fc\u63a5\u4e0e\u540c\u4e00\u4e2a\u4e8b\u52a1\u4e2d\u8fdb\u884c 10w insert \u6548\u7387\u6ca1\u4ec0\u4e48\u5dee\u522b\u3002\u7528\u540c\u4e00\u4e2a\u4e8b\u52a1\u5373\u53ef\uff0c\u62fc\u63a5\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u4e0d\u597d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949454\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 857681664 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u4e00\u5806\u5355\u6761 insert \u5728\u4e00\u4e2a\u4e8b\u52a1\u91cc\uff0c\u8ddf\u6279\u91cf insert \u5dee\u8ddd\u5ffd\u7565\u4e0d\u8ba1\uff0c\u5982\u679c\u5355\u6761 insert \u662f\u6bcf\u6b21\u5355\u5f00\u4e00\u4e2a\u4e8b\u52a1\uff0c\u90a3\u5dee\u8ddd\u5927\u6982\u662f\u51e0\u5341\u500d\uff0c\u524d\u51e0\u5929\u521a\u597d\u9047\u5230\u8fc7\u8fd9\u4e2a\u95ee\u9898\uff0c\u7528 spring \u7684 scriptUtil.execScript\uff0c\u7ed9\u7684 sql \u662f\u5927\u91cf\u5355\u6761 insert\uff0c1000 \u6761\u63d2\u5165\u8017\u65f6 2s \u591a\uff0c\u6362\u6210\u6279\u91cf\u63d2\u5165 100ms \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949455\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xdsty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6781\u5ba2\u65f6\u95f4 mysql \u5b9e\u6218\u633a\u4e0d\u9519                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949456\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xdsty <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6bcf\u6b21 insert \u90fd\u8981\u5237 redo log \u548c binlog\uff0c\u8fd9\u90fd\u662f\u9700\u8981\u5199\u5165\u786c\u76d8\u7684\uff0c\u6240\u4ee5\u8f83\u6162\u3002<br \/>\u5408\u5e76\u4e3a\u6279\u91cf sql\uff0c\u53ea\u9700\u8981\u5237\u4e00\u6b21 redo log \u548c binlog\uff0c\u4f1a\u5feb\u4e00\u4e9b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949457\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : passerbytiny <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u3001\u53ea\u8981\u662f for \u5faa\u73af\u4e2d\u7684 sql\uff0c\u4e0d\u7ba1\u662f\u63d2\u5165\u8fd8\u662f\u67e5\u8be2\uff0c\u90fd\u662f\u53ef\u4ee5\u4f7f\u7528\u6279\u91cf\u7684\u65b9\u5f0f\u66ff\u4ee3\u7684\u3002<br \/>\u4e8c\u3001\u4e00\u6b21\u625b\u4e24\u6876\u6c34\uff0c\u76f8\u6bd4\u6bcf\u6b21\u625b\u4e00\u6876\u6c34\u625b\u4e24\u6b21\uff0c\u6709\u6548\u4ed8\u51fa\u662f\u4e00\u6837\u7684\uff0c\u4f46\u901a\u5e38\u524d\u8005\u7684\u65e0\u6548\u4ed8\u51fa\u66f4\u5c11\uff08\u4e00\u79cd\u4f8b\u5916\u60c5\u51b5\u662f\uff0c\u6ca1\u6709\u90a3\u80fd\u529b\u8fd8\u786c\u625b\u5bfc\u81f4\u8def\u4e0a\u6c34\u6492\u4e86\u6700\u7ec8\u53d8\u6210\u5148\u625b\u4e00\u6876\u534a\u518d\u625b\u4e00\u6876\uff09\u3002\u7b80\u5355\u8bf4\u5c31\u662f\u901a\u5e38\u60c5\u51b5\u4e0b\u6279\u91cf\u6bd4\u5faa\u73af\u597d\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u5e76\u4e0d\u662f for \u5faa\u73af\u4e2d\u7528 sql \u6548\u7387\u5e95\u4e0b\uff0c\u800c\u662f\u6539\u6210\u6279\u91cf\u6a21\u5f0f\u4f1a\u66f4\u597d\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949458\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ytymf <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0a\u8bf4\u7684\u4e0d\u9519\uff0c\u65e5\u5fd7\u5f00\u9500\u4e5f\u662f\u5f88\u5927\u4e00\u90e8\u5206                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949459\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 1194129822 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u8981\u4ee5\u4e3a JDBC addBatch \u548c mybatis BatchExecutor \u5c31\u662f\u771f\u6b63\u7684\u6279\u91cf\u63d0\u4ea4!!!\u8fd9\u4e2a\u529f\u80fd\u8981\u5148\u5f00\u542f\u624d\u80fd\u7528\uff0c\u5728 JDBC url \u540e\u9762\u52a0 rewriteBatchedStatements=true\uff0c\u4e0d\u7136\u8fd8\u662f\u8d70\u7684\u5faa\u73af\u63d2\u5165\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949460\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kingofzihua <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u4e0b\u4e70 10 \u74f6\u6c34<br \/>\u65b9\u6848 1\uff1a\u6bcf\u6b21\u4e70\u4e00\u74f6\uff0c\u8dd1 10 \u6b21 =&gt; for \u5faa\u73af<br \/>\u65b9\u6848 2\uff1a\u4e00\u6b21\u4e70 10 \u74f6 =&gt; \u4e0d\u7528 for \u5faa\u73af<\/p>\n<p>\u6240\u4ee5\u4e0d\u7528 for \u5faa\u73af\u8fdb\u884c\u6267\u884c sql<\/p>\n<p>\u4f46\u662f\u5982\u679c\u4f60 1 \u6b21\u62ff\u4e0d\u4e86\uff0c\u53ef\u4ee5 \u6bcf\u6b21\u53d6 3 \u6761 for                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949461\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : constructor <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63d2\u5165 10000 \u6761\u6570\u636e\u5b9e\u6d4b\u7ed3\u679c\uff1a<br \/> \u4e00\u6b21\u6027\u6279\u91cf\u63d2\u5165 1 \u4e07\u6761: 118.087ms<br \/> \u5f00\u542f\u4e8b\u52a1\u5faa\u73af\u63d2\u5165 1 \u4e07\u6761: 16.562s<br \/>\u4e0d\u5f00\u542f\u4e8b\u52a1\u5faa\u73af\u63d2\u5165 1 \u4e07\u6761: 42.204s<\/p>\n<p>js \u4ee3\u7801\uff1a https:\/\/gist.github.com\/xuxucode\/e16d9df4476e2e10e3858287c442a778 <button onclick=\"lazyGist(this)\">\u00a0\u663e\u793a Gist \u4ee3\u7801\u00a0<\/button> <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949462\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : aragakiyuii <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u89c9\u5f97\u5728\u5ffd\u7565\u6570\u636e\u5e93\u672c\u8eab\u6027\u80fd\u7684\u60c5\u51b5\u4e0b\uff0c\u65e0\u8bba\u7528\u4ec0\u4e48 orm\uff0c\u53ea\u8981\u80fd\u4fdd\u8bc1\u8fd9\u4e9b insert \u5728\u4e00\u4e2a\u4e8b\u52a1\u91cc\u63d0\u4ea4\u6267\u884c\u5c31 ok                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>for \u5faa\u73af\u4e2d\u6267\u884c sql \u8bed\u53e5\uff0c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/181925"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=181925"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/181925\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=181925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=181925"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=181925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}