Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize permanent deletion of Studies with objects not shared copied/moved from/to other Studies #4460

Closed
gunterze opened this issue Apr 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gunterze
Copy link
Member

gunterze commented Apr 4, 2024

Use bulk update for marking objects of a Study not shared copied/moved from/to other Studies for deletion:

update location
set status      = 1,
    instance_fk = null
where pk in (select l2_0.pk
             from location l2_0
                      join instance i2_0 on i2_0.pk = l2_0.instance_fk
                      join series s1_0 on s1_0.pk = i2_0.series_fk
             where s1_0.study_fk = ?
               and l2_0.status <> 1
               and l2_0.object_type = 0
               and l2_0.multi_ref is null
               and l2_0.uidmap_fk is null)

to speed-up permanent deletion of Studies with objects not shared copied/moved from/to other Studies.

Related #4443, #4444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant