Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
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
dCache
cta
Commits
6c6eec09
Commit
6c6eec09
authored
12 years ago
by
Sebastien Ponce
Browse files
Options
Downloads
Patches
Plain Diff
Added some hints to the query deciding which file to GC in order to stabilize the execution plan
parent
708a478f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/db/oracleGC.sql
+3
-3
3 additions, 3 deletions
castor/db/oracleGC.sql
with
3 additions
and
3 deletions
castor/db/oracleGC.sql
+
3
−
3
View file @
6c6eec09
...
...
@@ -337,15 +337,15 @@ BEGIN
-- Loop on file deletions
FOR
dc
IN
(
SELECT
/*+ INDEX(DiskCopy I_DiskCopy_FS_GCW) */
id
,
castorFile
FROM
DiskCopy
WHERE
fileSystem
=
fs
.
id
AND
status
=
0
--
STAGED
AND
status
=
dconst
.
DISKCOPY_
STAGED
AND
NOT
EXISTS
(
SELECT
/*+ INDEX(SubRequest I_SubRequest_DiskCopy) */
'x'
SELECT
/*+
NL_AJ
INDEX(SubRequest I_SubRequest_DiskCopy) */
'x'
FROM
SubRequest
WHERE
SubRequest
.
diskcopy
=
DiskCopy
.
id
AND
SubRequest
.
status
IN
(
4
,
5
,
6
,
12
,
13
,
14
))
-- being processed (WAIT*, READY, *SCHED)
AND
NOT
EXISTS
-- Ignore diskcopies with active replications
(
SELECT
/*+ INDEX(DCRR I_StageDiskCopyReplic_DestDC) */
'x'
(
SELECT
/*+
NL_AJ
INDEX(DCRR I_StageDiskCopyReplic_DestDC) */
'x'
FROM
StageDiskCopyReplicaRequest
DCRR
,
DiskCopy
DD
WHERE
DCRR
.
destDiskCopy
=
DD
.
id
AND
DCRR
.
sourceDiskCopy
=
DiskCopy
.
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