Skip to content
Snippets Groups Projects
Commit fed93f35 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added indices to support faster query (needed for...

- added indices to support faster query (needed for analysis/finde_lzaid_dubletten_exkl_gelöscht.sh)
parent 99b0d05b
Branches
No related tags found
No related merge requests found
......@@ -324,17 +324,22 @@ SQL_DELETE_PLAN
###############################################################################
sub write_index_creation($dbh) {
my $sql1=<<"SQL_INDEX1";
CREATE UNIQUE INDEX aip_index ON aip (ie_id, version);
CREATE UNIQUE INDEX aip_index ON aip (ie_id, version ASC);
SQL_INDEX1
my $sql2=<<"SQL_INDEX2";
CREATE UNIQUE INDEX sourcedata_index ON sourcedatafile (aip_id, name);
SQL_INDEX2
my $sql3=<<"SQL_INDEX3";
CREATE UNIQUE INDEX delete_index ON deleted (aip_id);
CREATE INDEX delete_index ON deleted (aip_id ASC);
SQL_INDEX3
my $sql4=<<"SQL_INDEX4";
CREATE INDEX aip_index2 ON aip (lza_id ASC);
SQL_INDEX4
my $sth1 = $dbh->prepare($sql1); $sth1->execute() or die "sql problem detected", $dbh->errstr;
my $sth2 = $dbh->prepare($sql2); $sth2->execute() or die "sql problem detected", $dbh->errstr;
my $sth3 = $dbh->prepare($sql3); $sth2->execute() or die "sql problem detected", $dbh->errstr;
my $sth3 = $dbh->prepare($sql3); $sth3->execute() or die "sql problem detected", $dbh->errstr;
my $sth4 = $dbh->prepare($sql4); $sth4->execute() or die "sql problem detected", $dbh->errstr;
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment