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
b204dbef
Commit
b204dbef
authored
1 year ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- improved SQL using view to speedup query to "real time".
parent
fed93f35
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
analysis/finde_lzaid_dubletten_exkl_gelöscht.sh
+10
-4
10 additions, 4 deletions
analysis/finde_lzaid_dubletten_exkl_gelöscht.sh
with
10 additions
and
4 deletions
analysis/finde_lzaid_dubletten_exkl_gelöscht.sh
+
10
−
4
View file @
b204dbef
#!bin/bash
sql1
=
$(
cat
<<
'
SQL1
'
SELECT ie_id,lza_id,version,dir_path FROM aip where lza_id in (
CREATE TEMP VIEW nondeleted (id,ie_id,lza_id,version,dir_path) AS
SELECT * FROM aip WHERE aip.id NOT IN (
SELECT aip_id FROM deleted
)
;
SELECT ie_id,lza_id,version,dir_path FROM nondeleted where lza_id in (
SELECT lza_id FROM (
SELECT lza_id, COUNT(*) AS anzahl_ie_pids
FROM (
SELECT ie_id, lza_id, COUNT(*) as versionen
FROM
aip
FROM
nondeleted
GROUP BY ie_id, lza_id
) WHERE aip.id NOT IN (
SELECT aip_id FROM deleted
)
GROUP BY lza_id
HAVING anzahl_ie_pids > 1
...
...
@@ -19,3 +22,6 @@ SQL1
)
echo
"
${
sql1
}
"
| sqlite3
"
$1
"
#CREATE INDEX aip_idx_38e01099 ON aip(ie_id, lza_id);
#CREATE INDEX aip_idx_006ebc63 ON aip(lza_id);
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