Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gstlal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Duncan Macleod
gstlal
Commits
8c5fbfc2
Commit
8c5fbfc2
authored
6 years ago
by
Duncan Meacher
Browse files
Options
Downloads
Patches
Plain Diff
simplify_and_cluster.sql: Fix to speed up run time
parent
83299bdc
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
gstlal-inspiral/share/simplify_and_cluster.sql
+7
-0
7 additions, 0 deletions
gstlal-inspiral/share/simplify_and_cluster.sql
with
7 additions
and
0 deletions
gstlal-inspiral/share/simplify_and_cluster.sql
+
7
−
0
View file @
8c5fbfc2
...
...
@@ -35,6 +35,7 @@ CREATE TEMPORARY TABLE _idmap_ AS
old
.
process_id
;
DROP
INDEX
tmpindex
;
CREATE
INDEX
tmpindex
ON
_idmap_
(
old
);
CREATE
INDEX
tmpindex2
ON
_idmap_
(
new
,
old
);
UPDATE
coinc_event
SET
process_id
=
(
SELECT
new
FROM
_idmap_
WHERE
old
==
process_id
);
UPDATE
segment
SET
process_id
=
(
SELECT
new
FROM
_idmap_
WHERE
old
==
process_id
);
...
...
@@ -47,6 +48,7 @@ DELETE FROM process WHERE process_id IN (SELECT old FROM _idmap_ WHERE old != ne
DELETE
FROM
process_params
WHERE
process_id
NOT
IN
(
SELECT
process_id
FROM
process
);
DROP
INDEX
tmpindex
;
DROP
INDEX
tmpindex2
;
DROP
TABLE
_idmap_
;
--
...
...
@@ -66,11 +68,13 @@ CREATE TEMPORARY TABLE _idmap_ AS
GROUP
BY
old
.
coinc_def_id
;
CREATE
INDEX
tmpindex
ON
_idmap_
(
old
);
CREATE
INDEX
tmpindex2
ON
_idmap_
(
new
,
old
);
UPDATE
coinc_event
SET
coinc_def_id
=
(
SELECT
new
FROM
_idmap_
WHERE
old
==
coinc_def_id
);
DELETE
FROM
coinc_definer
WHERE
coinc_def_id
IN
(
SELECT
old
FROM
_idmap_
WHERE
old
!=
new
);
DROP
INDEX
tmpindex
;
DROP
INDEX
tmpindex2
;
DROP
TABLE
_idmap_
;
--
...
...
@@ -108,6 +112,8 @@ DROP TABLE _idmap_;
-- references to their IDs in other tables
--
CREATE
INDEX
tmpindex
ON
segment
(
segment_def_id
,
start_time
,
start_time_ns
,
end_time
,
end_time_ns
);
DELETE
FROM
segment
WHERE
...
...
@@ -125,6 +131,7 @@ WHERE
AND
other
.
segment_id
<
segment
.
segment_id
);
DROP
INDEX
tmpindex
;
--
-- time_slide clean up
--
...
...
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