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

- add index on "deleted" table

parent 11d2b8b5
No related branches found
No related tags found
No related merge requests found
......@@ -324,13 +324,17 @@ 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);
SQL_INDEX1
my $sql2=<<"SQL_INDEX2";
CREATE UNIQUE INDEX sourcedata_index on sourcedatafile (aip_id, name);
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);
SQL_INDEX3
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;
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment