From d7308ea62e07d7ea71610669016482980d6e1ea3 Mon Sep 17 00:00:00 2001 From: Andreas Romeyke <art1@andreas-romeyke.de> Date: Thu, 22 Jul 2021 16:03:46 +0200 Subject: [PATCH] - added index to db --- perl/exit_strategy.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/perl/exit_strategy.pl b/perl/exit_strategy.pl index 79ac1b5..f90c411 100644 --- a/perl/exit_strategy.pl +++ b/perl/exit_strategy.pl @@ -232,9 +232,7 @@ SQL_DC_PLAN ############################################################################### sub write_index_creation($dbh) { my $sql=<<"SQL_INDEX"; - -- BEGIN; - -- CREATE UNIQUE INDEX aip_index on aip (ie_id); - -- COMMIT; + CREATE UNIQUE INDEX aip_index on aip (ie_id); SQL_INDEX my $sth = $dbh->prepare($sql); $sth->execute() or die "sql problem detected", $dbh->errstr; @@ -520,6 +518,7 @@ sub searching_ie_files ($dir, $tmp_ies_unsorted_file) { write_database_creation($dbh); write_tables_creation($dbh); write_prepare_insert($dbh); + write_index_creation($dbh); while( <$fh_truncated_IEs> ) { chomp; print $progressbar->report("parse IE files: %40b ETA: %E \r", $count++); @@ -528,7 +527,7 @@ sub searching_ie_files ($dir, $tmp_ies_unsorted_file) { write_addsql($dbh, $ret); } say ""; - write_index_creation($dbh); + $dbh->disconnect or warn("disconnecting problems, ", $dbh->errstr); say "processed $count uniq IEs"; } else { -- GitLab