mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 02:46:46 -04:00
Rewrite DeleteUnused() queries using new indices
This commit is contained in:
parent
5c8315e6ff
commit
f0bfa7a43b
3 changed files with 13 additions and 13 deletions
|
@ -70,10 +70,10 @@ class LocSubject{
|
|||
*/
|
||||
public static function DeleteUnused(): void{
|
||||
Db::Query('
|
||||
DELETE
|
||||
from LocSubjects
|
||||
where LocSubjectId not in
|
||||
(select distinct LocSubjectId from EbookLocSubjects)
|
||||
DELETE ls
|
||||
from LocSubjects ls
|
||||
left join EbookLocSubjects els using (LocSubjectId)
|
||||
where els.LocSubjectId is null
|
||||
');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue