サーバ:Oracle11g
クライアント:Windows10+Vagrant+CentOS7.4.1708、oracle-instantclient11.1-sqlplus-11.1.0.7.0-1
SQL
1CREATE TABLE TABLE1 (COL1 VARCHAR2(1500));
SQL
1(test.sql) 2select to_char(systimestamp, 'yyyy/mm/dd hh24:mi:ss.ff3') from dual; 3insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 4insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 5insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 6insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 7insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 8insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 9insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 10insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 11insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 12insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 13insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 14insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 15insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 16insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 17insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 18insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 19insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 20insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 21insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 22insert into TABLE1 (COL1) values ('111・・・(中略)・・・111'); 23commit; 24select to_char(systimestamp, 'yyyy/mm/dd hh24:mi:ss.ff3') from dual;
インサートしようとする値が1146Byteの場合(1が1146回連続した文字列をインサートする場合)
bash
1[root@localhost home]# sqlplus xxx/xxx@192.168.0.xxx:1521/xxx @test.sql 2 3SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jul 11 17:08:43 2019 4 5Copyright (c) 1982, 2008, Oracle. All rights reserved. 6 7 8Connected to: 9Oracle Database 11g Release 11.2.0.3.0 - 64bit Production 10 11 12TO_CHAR(SYSTIMESTAMP,'YYYY/MM 13----------------------------- 142019/07/11 17:08:33.018 15 16 171 row created. 18 19 201 row created. 21 22 231 row created. 24 25 261 row created. 27 28 291 row created. 30 31 321 row created. 33 34 351 row created. 36 37 381 row created. 39 40 411 row created. 42 43 441 row created. 45 46 471 row created. 48 49 501 row created. 51 52 531 row created. 54 55 561 row created. 57 58 591 row created. 60 61 621 row created. 63 64 651 row created. 66 67 681 row created. 69 70 711 row created. 72 73 741 row created. 75 76 77Commit complete. 78 79 80TO_CHAR(SYSTIMESTAMP,'YYYY/MM 81----------------------------- 822019/07/11 17:08:33.049
インサートしようとする値が1147Byteの場合(1が1147回連続した文字列をインサートする場合)
bash
1[root@localhost home]# sqlplus xxx/xxx@192.168.0.xxx:1521/xxx @test.sql 2SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jul 11 17:06:42 2019 3 4Copyright (c) 1982, 2008, Oracle. All rights reserved. 5 6 7Connected to: 8Oracle Database 11g Release 11.2.0.3.0 - 64bit Production 9 10 11TO_CHAR(SYSTIMESTAMP,'YYYY/MM 12----------------------------- 132019/07/11 17:06:31.478 14 15 161 row created. 17 18 191 row created. 20 21 221 row created. 23 24 251 row created. 26 27 281 row created. 29 30 311 row created. 32 33 341 row created. 35 36 371 row created. 38 39 401 row created. 41 42 431 row created. 44 45 461 row created. 47 48 491 row created. 50 51 521 row created. 53 54 551 row created. 56 57 581 row created. 59 60 611 row created. 62 63 641 row created. 65 66 671 row created. 68 69 701 row created. 71 72 731 row created. 74 75 76Commit complete. 77 78 79TO_CHAR(SYSTIMESTAMP,'YYYY/MM 80----------------------------- 812019/07/11 17:06:35.659
つまり、
インサートしようとする値が1146Byteの場合は約0.03秒で完了します。
インサートしようとする値が1147Byteの場合は約4.18秒で完了します。
パラメータを1Byte増やすだけで処理時間が大幅に増えるのですが、どのようなことが理由として考えられるでしょうか。
宜しくおねがいします。

回答2件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。