Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rosettaExitStrategy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
rosettaExitStrategy
Commits
7d536807
Commit
7d536807
authored
8 months ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- fixed view 'non_deleted_aip', also changed to use faster 'NOT EXISTS', because it uses indices
parent
bce81dd8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
perl/exit_strategy.pl
+4
-2
4 additions, 2 deletions
perl/exit_strategy.pl
perl/t/expected.sql
+4
-2
4 additions, 2 deletions
perl/t/expected.sql
with
8 additions
and
4 deletions
perl/exit_strategy.pl
+
4
−
2
View file @
7d536807
...
@@ -363,8 +363,10 @@ SQL_INDEX4
...
@@ -363,8 +363,10 @@ SQL_INDEX4
SQL_INDEX5
SQL_INDEX5
my
$sql6
=
<<"SQL_VIEW";
my
$sql6
=
<<"SQL_VIEW";
CREATE VIEW non_deleted_aip(id,ie_id,lza_id,version,dir_path) AS
CREATE VIEW non_deleted_aip(id,ie_id,lza_id,version,dir_path) AS
SELECT * FROM aip WHERE aip.id NOT IN (
SELECT * FROM aip WHERE NOT EXISTS (
SELECT aip_id FROM deleted
SELECT aip_id FROM deleted WHERE aip.id == aip_id
) AND NOT EXISTS (
SELECT aip_id FROM purged WHERE aip.id == aip_id
);
);
SQL_VIEW
SQL_VIEW
my
$sth1
=
$dbh
->
prepare
(
$sql1
);
$sth1
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
my
$sth1
=
$dbh
->
prepare
(
$sql1
);
$sth1
->
execute
()
or
die
"
sql problem detected
",
$dbh
->
errstr
;
...
...
This diff is collapsed.
Click to expand it.
perl/t/expected.sql
+
4
−
2
View file @
7d536807
...
@@ -94,7 +94,9 @@ CREATE INDEX delete_index ON deleted (aip_id);
...
@@ -94,7 +94,9 @@ CREATE INDEX delete_index ON deleted (aip_id);
CREATE
INDEX
aip_index2
ON
aip
(
lza_id
);
CREATE
INDEX
aip_index2
ON
aip
(
lza_id
);
CREATE
INDEX
aip_index3
ON
aip
(
ie_id
,
lza_id
);
CREATE
INDEX
aip_index3
ON
aip
(
ie_id
,
lza_id
);
CREATE
VIEW
non_deleted_aip
(
id
,
ie_id
,
lza_id
,
version
,
dir_path
)
AS
CREATE
VIEW
non_deleted_aip
(
id
,
ie_id
,
lza_id
,
version
,
dir_path
)
AS
SELECT
*
FROM
aip
WHERE
aip
.
id
NOT
IN
(
SELECT
*
FROM
aip
WHERE
NOT
EXISTS
(
SELECT
aip_id
FROM
deleted
SELECT
aip_id
FROM
deleted
WHERE
aip
.
id
==
aip_id
)
AND
NOT
EXISTS
(
SELECT
aip_id
FROM
purged
WHERE
aip
.
id
==
aip_id
);
);
COMMIT
;
COMMIT
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment