You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

638 lines
21 KiB

  1. #!/usr/bin/perl
  2. # Copyright (c) 2001, 2003, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
  3. # Use is subject to license terms.
  4. #
  5. # This library is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU Library General Public
  7. # License as published by the Free Software Foundation; version 2
  8. # of the License.
  9. #
  10. # This library is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. # Library General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Library General Public
  16. # License along with this library; if not, write to the Free
  17. # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  18. # MA 02110-1301, USA
  19. #
  20. # AS3AP single-user benchmark.
  21. #
  22. ##################### Standard benchmark inits ##############################
  23. use Cwd;
  24. use DBI;
  25. use Benchmark;
  26. $pwd = cwd(); $pwd = "." if ($pwd eq '');
  27. require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
  28. $opt_loop_count=1;
  29. #Create tables
  30. $dbh = $server->connect();
  31. #Create Table
  32. $sth = $dbh->do("drop table uniques");
  33. $sth = $dbh->do("drop table updates");
  34. $sth = $dbh->do("drop table hundred");
  35. $sth = $dbh->do("drop table tenpct");
  36. $sth = $dbh->do("drop table tiny");
  37. #Temporary table
  38. $sth = $dbh->do("drop table saveupdates");
  39. @fields=("col_key int not null",
  40. "col_int int not null",
  41. "col_signed int not null",
  42. "col_float float not null",
  43. "col_double float not null",
  44. "col_decim numeric(18,2) not null",
  45. "col_date char(20) not null",
  46. "col_code char(10) not null",
  47. "col_name char(20) not null",
  48. "col_address varchar(80) not null");
  49. do_many($dbh,$server->create("uniques",\@fields,[]));
  50. do_many($dbh,$server->create("updates",\@fields,[]));
  51. do_many($dbh,$server->create("hundred",\@fields,[]));
  52. do_many($dbh,$server->create("tenpct",\@fields,[]));
  53. do_many($dbh,$server->create("tiny",["col_key int not null"],[]));
  54. print "Start AS3AP benchmark\n\n";
  55. $start_time=new Benchmark;
  56. print "Load DATA\n";
  57. #Load DATA
  58. @table_names=("uniques","updates","hundred","tenpct","tiny");
  59. $loop_time=new Benchmark;
  60. if ($opt_fast && $server->{'limits'}->{'load_data_infile'})
  61. {
  62. for ($ti = 0; $ti <= $#table_names; $ti++)
  63. {
  64. my $table_name = $table_names[$ti];
  65. my $file = "$pwd/Data/AS3AP/${table_name}\.new";
  66. print "$table_name - $file\n" if ($opt_debug);
  67. $row_count += $server->insert_file($table_name,$file,$dbh);
  68. }
  69. }
  70. else
  71. {
  72. for ($ti = 0; $ti <= $#table_names; $ti++)
  73. {
  74. my $table_name = $table_names[$ti];
  75. print "$table_name - $file\n" if ($opt_debug);
  76. my $insert_start = "insert into $table_name values (";
  77. open(DATA, "$pwd/Data/AS3AP/${table_name}\.new") || die "Can't open text file: $pwd/Data/AS3AP/${table_name}\.new\n";
  78. while(<DATA>)
  79. {
  80. chomp;
  81. next unless ( $_ =~ /\w/ ); # skip blank lines
  82. $command = $insert_start."$_".")";
  83. $command =~ $server->fix_to_insert($command);
  84. print "$command\n" if ($opt_debug);
  85. $sth = $dbh->do($command) or die "Got error: $DBI::errstr when executing '$command'\n";
  86. $row_count++;
  87. }
  88. close(DATA);
  89. }
  90. }
  91. $end_time=new Benchmark;
  92. print "Time for Load Data - " . "($row_count): " .
  93. timestr(timediff($end_time, $loop_time),"all") . "\n\n";
  94. print "Create Index\n";
  95. test_command("create_idx_uniques_key_bt",
  96. "time for create_idx_uniques_key_bt",
  97. "create unique index uniques_key_bt on uniques (col_key)",$dbh,$opt_loop_count);
  98. test_command("create_idx_updates_key_bt",
  99. "time for create_idx_updates_key_bt",
  100. "create unique index updates_key_bt on updates (col_key)",$dbh,$opt_loop_count);
  101. test_command("create_idx_hundred_key_bt",
  102. "time for create_idx_hundred_key_bt",
  103. "create unique index hundred_key_bt on hundred (col_key)",
  104. $dbh,$opt_loop_count);
  105. test_command("create_idx_tenpct_key_bt",
  106. "time for create_idx_tenpct_key_bt",
  107. "create unique index tenpct_key_bt on tenpct (col_key)",$dbh,$opt_loop_count);
  108. test_command("create_idx_tenpct_key_code_bt",
  109. "time for create_idx_tenpct_key_code_bt",
  110. "create index tenpct_key_code_bt on tenpct (col_key,col_code)",
  111. $dbh,$opt_loop_count);
  112. test_command("create_idx_tiny_key_bt",
  113. "time for create_idx_tiny_key_bt",
  114. "create index tiny_key_bt on tiny (col_key)",$dbh,$opt_loop_count);
  115. test_command("create_idx_tenpct_int_bt",
  116. "time for create_idx_tenpct_int_bt",
  117. "create index tenpct_int_bt on tenpct (col_int)",$dbh,$opt_loop_count);
  118. test_command("create_idx_tenpct_signed_bt",
  119. "time for create_idx_tenpct_signed_bt",
  120. "create index tenpct_signed_bt on tenpct (col_signed)",$dbh,$opt_loop_count);
  121. test_command("create_idx_uniques_code_h",
  122. "time for create_idx_uniques_code_h",
  123. "create index uniques_code_h on uniques (col_code)",$dbh,$opt_loop_count);
  124. test_command("create_idx_tenpct_double_bt",
  125. "time for create_idx_tenpct_double_bt",
  126. "create index tenpct_double_bt on tenpct (col_double)",$dbh,$opt_loop_count);
  127. test_command("create_idx_updates_decim_bt",
  128. "time for create_idx_updates_decim_bt",
  129. "create index updates_decim_bt on updates (col_decim)",$dbh,$opt_loop_count);
  130. test_command("create_idx_tenpct_float_bt",
  131. "time for create_idx_tenpct_float_bt",
  132. "create index tenpct_float_bt on tenpct (col_float)",$dbh,$opt_loop_count);
  133. test_command("create_idx_updates_int_bt",
  134. "time for create_idx_updates_int_bt",
  135. "create index updates_int_bt on updates (col_int)",$dbh,$opt_loop_count);
  136. test_command("create_idx_tenpct_decim_bt",
  137. "time for create_idx_tenpct_decim_bt",
  138. "create index tenpct_decim_bt on tenpct (col_decim)",$dbh,$opt_loop_count);
  139. test_command("create_idx_hundred_code_h",
  140. "time for create_idx_hundred_code_h",
  141. "create index hundred_code_h on hundred (col_code)",$dbh,$opt_loop_count);
  142. test_command("create_idx_tenpct_name_h",
  143. "time for create_idx_tenpct_name_h",
  144. "create index tenpct_name_h on tenpct (col_name)",$dbh,$opt_loop_count);
  145. test_command("create_idx_updates_code_h",
  146. "time for create_idx_updates_code_h",
  147. "create index updates_code_h on updates (col_code)",$dbh,$opt_loop_count);
  148. test_command("create_idx_tenpct_code_h",
  149. "time for create_idx_tenpct_code_h",
  150. "create index tenpct_code_h on tenpct (col_code)",$dbh,$opt_loop_count);
  151. test_command("create_idx_updates_double_bt",
  152. "time for create_idx_updates_double_bt",
  153. "create index updates_double_bt on updates (col_double)",$dbh,$opt_loop_count);
  154. test_command("create_idx_hundred_foreign",
  155. "time for create_idx_hundred_foreign",
  156. "alter table hundred add constraint fk_hundred_updates foreign key (col_signed)
  157. references updates (col_key)",$dbh,$opt_loop_count);
  158. test_query("sel_1_cl",
  159. "Time to sel_1_cl",
  160. "select col_key, col_int, col_signed, col_code, col_double, col_name
  161. from updates where col_key = 1000",$dbh,$opt_loop_count);
  162. test_query("join_3_cl",
  163. "Time to join_3_cl",
  164. "select uniques.col_signed, uniques.col_date,
  165. hundred.col_signed, hundred.col_date,
  166. tenpct.col_signed, tenpct.col_date
  167. from uniques, hundred, tenpct
  168. where uniques.col_key = hundred.col_key
  169. and uniques.col_key = tenpct.col_key
  170. and uniques.col_key = 1000",$dbh,$opt_loop_count);
  171. test_query("sel_100_ncl",
  172. "Time to sel_100_ncl",
  173. "select col_key, col_int, col_signed, col_code,col_double, col_name
  174. from updates where col_int <= 100",$dbh,$opt_loop_count);
  175. test_query("table_scan",
  176. "Time to table_scan",
  177. "select * from uniques where col_int = 1",$dbh,$opt_loop_count);
  178. test_query("agg_func",
  179. "Time for agg_func",
  180. "select min(col_key) from hundred group by col_name",$dbh,$opt_loop_count);
  181. test_query("agg_scal",
  182. "Time for agg_scal",
  183. "select min(col_key) from uniques",$dbh,$opt_loop_count);
  184. test_query("sel_100_cl",
  185. "Time for sel_100_cl",
  186. "select col_key, col_int, col_signed, col_code,
  187. col_double, col_name
  188. from updates where col_key <= 100",$dbh,$opt_loop_count);
  189. test_query("join_3_ncl",
  190. "Time for join_3_ncl",
  191. "select uniques.col_signed, uniques.col_date,
  192. hundred.col_signed, hundred.col_date,
  193. tenpct.col_signed, tenpct.col_date
  194. from uniques, hundred, tenpct
  195. where uniques.col_code = hundred.col_code
  196. and uniques.col_code = tenpct.col_code
  197. and uniques.col_code = 'BENCHMARKS'",$dbh,$opt_loop_count);
  198. test_query("sel_10pct_ncl",
  199. "Time for sel_10pct_ncl",
  200. "select col_key, col_int, col_signed, col_code,
  201. col_double, col_name
  202. from tenpct
  203. where col_name = 'THE+ASAP+BENCHMARKS+'",$dbh,$opt_loop_count);
  204. if ($limits->{'subqueries'}){
  205. test_query("agg_simple_report",
  206. "Time for agg_simple_report",
  207. "select avg(updates.col_decim)
  208. from updates
  209. where updates.col_key in
  210. (select updates.col_key
  211. from updates, hundred
  212. where hundred.col_key = updates.col_key
  213. and updates.col_decim > 980000000)",$dbh,$opt_loop_count);
  214. }else{
  215. print "agg_simple_report - Failed\n\n";
  216. }
  217. test_query("agg_info_retrieval",
  218. "Time for agg_info_retrieval",
  219. "select count(col_key)
  220. from tenpct
  221. where col_name = 'THE+ASAP+BENCHMARKS'
  222. and col_int <= 100000000
  223. and col_signed between 1 and 99999999
  224. and not (col_float between -450000000 and 450000000)
  225. and col_double > 600000000
  226. and col_decim < -600000000",$dbh,$opt_loop_count);
  227. if ($limits->{'views'}){
  228. test_query("agg_create_view",
  229. "Time for agg_create_view",
  230. "create view
  231. reportview(col_key,col_signed,col_date,col_decim,
  232. col_name,col_code,col_int) as
  233. select updates.col_key, updates.col_signed,
  234. updates.col_date, updates.col_decim,
  235. hundred.col_name, hundred.col_code,
  236. hundred.col_int
  237. from updates, hundred
  238. where updates.col_key = hundred.col_key",$dbh,$opt_loop_count);
  239. test_query("agg_subtotal_report",
  240. "Time for agg_subtotal_report",
  241. "select avg(col_signed), min(col_signed), max(col_signed),
  242. max(col_date), min(col_date),
  243. count(distinct col_name), count(col_name),
  244. col_code, col_int
  245. from reportview
  246. where col_decim >980000000
  247. group by col_code, col_int",$dbh,$opt_loop_count);
  248. test_query("agg_total_report",
  249. "Time for agg_total_report",
  250. "select avg(col_signed), min(col_signed), max(col_signed),
  251. max(col_date), min(col_date),
  252. count(distinct col_name), count(col_name),
  253. count(col_code), count(col_int)
  254. from reportview
  255. where col_decim >980000000",$dbh,$opt_loop_count);
  256. }else{
  257. print "agg_create_view - Failed\n\n";
  258. print "agg_subtotal_report - Failed\n\n";
  259. print "agg_total_report - Failed\n\n";
  260. }
  261. #fix from here
  262. test_query("join_2_cl",
  263. "Time for join_2_cl",
  264. "select uniques.col_signed, uniques.col_name,
  265. hundred.col_signed, hundred.col_name
  266. from uniques, hundred
  267. where uniques.col_key = hundred.col_key
  268. and uniques.col_key =1000"
  269. ,$dbh,$opt_loop_count);
  270. test_query("join_2",
  271. "Time for join_2",
  272. "select uniques.col_signed, uniques.col_name,
  273. hundred.col_signed, hundred.col_name
  274. from uniques, hundred
  275. where uniques.col_address = hundred.col_address
  276. and uniques.col_address = 'SILICON VALLEY'"
  277. ,$dbh,$opt_loop_count);
  278. test_query("sel_variable_select_low",
  279. "Time for sel_variable_select_low",
  280. "select col_key, col_int, col_signed, col_code,
  281. col_double, col_name
  282. from tenpct
  283. where col_signed < -500000000"
  284. ,$dbh,$opt_loop_count);
  285. test_query("sel_variable_select_high",
  286. "Time for sel_variable_select_high",
  287. "select col_key, col_int, col_signed, col_code,
  288. col_double, col_name
  289. from tenpct
  290. where col_signed < -250000000"
  291. ,$dbh,$opt_loop_count);
  292. test_query("join_4_cl",
  293. "Time for join_4_cl",
  294. "select uniques.col_date, hundred.col_date,
  295. tenpct.col_date, updates.col_date
  296. from uniques, hundred, tenpct, updates
  297. where uniques.col_key = hundred.col_key
  298. and uniques.col_key = tenpct.col_key
  299. and uniques.col_key = updates.col_key
  300. and uniques.col_key = 1000"
  301. ,$dbh,$opt_loop_count);
  302. test_query("proj_100",
  303. "Time for proj_100",
  304. "select distinct col_address, col_signed from hundred"
  305. ,$dbh,$opt_loop_count);
  306. test_query("join_4_ncl",
  307. "Time for join_4_ncl",
  308. "select uniques.col_date, hundred.col_date,
  309. tenpct.col_date, updates.col_date
  310. from uniques, hundred, tenpct, updates
  311. where uniques.col_code = hundred.col_code
  312. and uniques.col_code = tenpct.col_code
  313. and uniques.col_code = updates.col_code
  314. and uniques.col_code = 'BENCHMARKS'"
  315. ,$dbh,$opt_loop_count);
  316. test_query("proj_10pct",
  317. "Time for proj_10pct",
  318. "select distinct col_signed from tenpct"
  319. ,$dbh,$opt_loop_count);
  320. test_query("sel_1_ncl",
  321. "Time for sel_1_ncl",
  322. "select col_key, col_int, col_signed, col_code,
  323. col_double, col_name
  324. from updates where col_code = 'BENCHMARKS'"
  325. ,$dbh,$opt_loop_count);
  326. test_query("join_2_ncl",
  327. "Time for join_2_ncl",
  328. "select uniques.col_signed, uniques.col_name,
  329. hundred.col_signed, hundred.col_name
  330. from uniques, hundred
  331. where uniques.col_code = hundred.col_code
  332. and uniques.col_code = 'BENCHMARKS'"
  333. ,$dbh,$opt_loop_count);
  334. if ($limits->{'foreign_key'}){
  335. do_many($dbh,$server->create("integrity_temp",\@fields,[]));
  336. test_query("integrity_test_1",
  337. "Time for integrity_test",
  338. "insert into integrity_temp select *
  339. from hundred where col_int=0",$dbh,$opt_loop_count);
  340. test_query("integrity_test_2",
  341. "Time for integrity_test",
  342. "update hundred set col_signed = '-500000000'
  343. where col_int = 0",$dbh,$opt_loop_count);
  344. test_query("integrity_test_3",
  345. "Time for integrity_test",
  346. "update hundred set col_signed = '-500000000'
  347. where col_int = 0",$dbh,$opt_loop_count);
  348. }else{
  349. print "integrity_test - Failed\n\n";
  350. }
  351. push @drop_seq_command,$server->drop_index("updates","updates_int_bt");
  352. push @drop_seq_command,$server->drop_index("updates","updates_double_bt");
  353. push @drop_seq_command,$server->drop_index("updates","updates_decim_bt");
  354. push @drop_seq_command,$server->drop_index("updates","updates_code_h");
  355. test_many_command("Drop updates keys",
  356. "Time for drop_updates_keys",
  357. \@drop_seq_command,$dbh,$opt_loop_count);
  358. do_many($dbh,$server->create("saveupdates",\@fields,[]));
  359. test_command("bulk_save",
  360. "Time for bulk_save",
  361. "insert into saveupdates select *
  362. from updates where col_key between 5000 and 5999"
  363. ,$dbh,$opt_loop_count);
  364. test_command("bulk_modify",
  365. "Time for bulk_modify",
  366. "update updates
  367. set col_key = col_key - 100000
  368. where col_key between 5000 and 5999"
  369. ,$dbh,$opt_loop_count);
  370. safe_command("upd_append_duplicate",
  371. "Time for upd_append_duplicate",
  372. "insert into updates
  373. values (6000, 0, 60000, 39997.90,
  374. 50005.00, 50005.00,
  375. '11/10/1985', 'CONTROLLER',
  376. 'ALICE IN WONDERLAND',
  377. 'UNIVERSITY OF ILLINOIS AT CHICAGO')"
  378. ,$dbh,$opt_loop_count);
  379. test_command("upd_remove_duplicate",
  380. "Time for upd_remove_duplicate",
  381. "delete from updates where col_key = 6000 and col_int = 0"
  382. ,$dbh,$opt_loop_count);
  383. test_command("upd_app_t_mid",
  384. "Time for upd_app_t_mid",
  385. "insert into updates
  386. values (5005, 5005, 50005, 50005.00, 50005.00,
  387. 50005.00, '1/1/1988', 'CONTROLLER',
  388. 'ALICE IN WONDERLAND',
  389. 'UNIVERSITY OF ILLINOIS AT CHICAGO')"
  390. ,$dbh,$opt_loop_count);
  391. test_command("upd_mod_t_mid",
  392. "Time for upd_mod_t_mid",
  393. "update updates set col_key = '-5000'
  394. where col_key = 5005"
  395. ,$dbh,$opt_loop_count);
  396. test_command("upd_del_t_mid",
  397. "Time for upd_del_t_mid",
  398. "delete from updates
  399. where (col_key='5005') or (col_key='-5000')"
  400. ,$dbh,$opt_loop_count);
  401. test_command("upd_app_t_end",
  402. "Time for upd_app_t_end",
  403. "delete from updates
  404. where (col_key='5005') or (col_key='-5000')"
  405. ,$dbh,$opt_loop_count);
  406. test_command("upd_mod_t_end",
  407. "Time for upd_mod_t_end",
  408. "update updates
  409. set col_key = -1000
  410. where col_key = 1000000001"
  411. ,$dbh,$opt_loop_count);
  412. test_command("upd_del_t_end",
  413. "Time for upd_del_t_end",
  414. "delete from updates where col_key = -1000"
  415. ,$dbh,$opt_loop_count);
  416. test_command("create_idx_updates_code_h",
  417. "time for create_idx_updates_code_h",
  418. "create index updates_code_h on updates (col_code)",
  419. $dbh,$opt_loop_count);
  420. test_command("upd_app_t_mid",
  421. "Time for upd_app_t_mid",
  422. "insert into updates
  423. values (5005, 5005, 50005, 50005.00, 50005.00,
  424. 50005.00, '1/1/1988', 'CONTROLLER',
  425. 'ALICE IN WONDERLAND',
  426. 'UNIVERSITY OF ILLINOIS AT CHICAGO')"
  427. ,$dbh,$opt_loop_count);
  428. test_command("upd_mod_t_cod",
  429. "Time for upd_mod_t_cod",
  430. "update updates
  431. set col_code = 'SQL+GROUPS'
  432. where col_key = 5005"
  433. ,$dbh,$opt_loop_count);
  434. test_command("upd_del_t_mid",
  435. "Time for upd_del_t_mid",
  436. "delete from updates
  437. where (col_key='5005') or (col_key='-5000')"
  438. ,$dbh,$opt_loop_count);
  439. test_command("create_idx_updates_int_bt",
  440. "time for create_idx_updates_int_bt",
  441. "create index updates_int_bt on updates (col_int)",
  442. $dbh,$opt_loop_count);
  443. test_command("upd_app_t_mid",
  444. "Time for upd_app_t_mid",
  445. "insert into updates
  446. values (5005, 5005, 50005, 50005.00, 50005.00,
  447. 50005.00, '1/1/1988', 'CONTROLLER',
  448. 'ALICE IN WONDERLAND',
  449. 'UNIVERSITY OF ILLINOIS AT CHICAGO')"
  450. ,$dbh,$opt_loop_count);
  451. test_command("upd_mod_t_int",
  452. "Time for upd_mod_t_int",
  453. "update updates set col_int = 50015 where col_key = 5005"
  454. ,$dbh,$opt_loop_count);
  455. test_command("upd_del_t_mid",
  456. "Time for upd_del_t_mid",
  457. "delete from updates
  458. where (col_key='5005') or (col_key='-5000')"
  459. ,$dbh,$opt_loop_count);
  460. test_command("bulk_append",
  461. "Time for bulk_append",
  462. "insert into updates select * from saveupdates"
  463. ,$dbh,$opt_loop_count);
  464. test_command("bulk_delete",
  465. "Time for bulk_delete",
  466. "delete from updates where col_key < 0"
  467. ,$dbh,$opt_loop_count);
  468. ################################ END ###################################
  469. ####
  470. #### End of the test...Finally print time used to execute the
  471. #### whole test.
  472. $dbh->disconnect;
  473. end_benchmark($start_time);
  474. ############################ HELP FUNCTIONS ##############################
  475. sub test_query
  476. {
  477. my($test_text,$result_text,$query,$dbh,$count)=@_;
  478. my($i,$loop_time,$end_time);
  479. print $test_text . "\n";
  480. $loop_time=new Benchmark;
  481. for ($i=0 ; $i < $count ; $i++)
  482. {
  483. defined(fetch_all_rows($dbh,$query)) or warn $DBI::errstr;
  484. }
  485. $end_time=new Benchmark;
  486. print $result_text . "($count): " .
  487. timestr(timediff($end_time, $loop_time),"all") . "\n\n";
  488. }
  489. sub test_command
  490. {
  491. my($test_text,$result_text,$query,$dbh,$count)=@_;
  492. my($i,$loop_time,$end_time);
  493. print $test_text . "\n";
  494. $loop_time=new Benchmark;
  495. for ($i=0 ; $i < $count ; $i++)
  496. {
  497. $dbh->do($query) or die $DBI::errstr;
  498. }
  499. $end_time=new Benchmark;
  500. print $result_text . "($count): " .
  501. timestr(timediff($end_time, $loop_time),"all") . "\n\n";
  502. }
  503. sub safe_command
  504. {
  505. my($test_text,$result_text,$query,$dbh,$count)=@_;
  506. my($i,$loop_time,$end_time);
  507. print $test_text . "\n";
  508. $loop_time=new Benchmark;
  509. for ($i=0 ; $i < $count ; $i++)
  510. {
  511. safe_do_many($dbh,$query);
  512. }
  513. $end_time=new Benchmark;
  514. print $result_text . "($count): " .
  515. timestr(timediff($end_time, $loop_time),"all") . "\n\n";
  516. }
  517. sub test_many_command
  518. {
  519. my($test_text,$result_text,$query,$dbh,$count)=@_;
  520. my($i,$loop_time,$end_time);
  521. $loop_time=new Benchmark;
  522. for ($i=0 ; $i < $count ; $i++)
  523. {
  524. safe_do_many($dbh, @$query);
  525. }
  526. $end_time=new Benchmark;
  527. print $result_text . "($count): " .
  528. timestr(timediff($end_time, $loop_time),"all") . "\n\n";
  529. }