More indicees for Kodi DB to increase sync speed
This commit is contained in:
parent
51745fd838
commit
bd1c2c3a0a
1 changed files with 6 additions and 6 deletions
|
@ -498,14 +498,14 @@ def create_kodi_db_indicees():
|
||||||
"""
|
"""
|
||||||
Index the "actors" because we got a TON - speed up SELECT and WHEN
|
Index the "actors" because we got a TON - speed up SELECT and WHEN
|
||||||
"""
|
"""
|
||||||
return
|
|
||||||
conn = kodi_sql('video')
|
conn = kodi_sql('video')
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
try:
|
commands = (
|
||||||
cursor.execute('CREATE UNIQUE INDEX ix_files_2 ON files (idFile);')
|
'CREATE UNIQUE INDEX IF NOT EXISTS ix_actor_2 ON actor (actor_id);',
|
||||||
except OperationalError:
|
'CREATE UNIQUE INDEX IF NOT EXISTS ix_files_2 ON files (idFile);',
|
||||||
# Index already exists
|
)
|
||||||
pass
|
for cmd in commands:
|
||||||
|
cursor.execute(cmd)
|
||||||
# Already used in Kodi >=17: CREATE UNIQUE INDEX ix_actor_1 ON actor (name)
|
# Already used in Kodi >=17: CREATE UNIQUE INDEX ix_actor_1 ON actor (name)
|
||||||
# try:
|
# try:
|
||||||
# cursor.execute('CREATE UNIQUE INDEX ix_pkc_actor_index ON actor (name);')
|
# cursor.execute('CREATE UNIQUE INDEX ix_pkc_actor_index ON actor (name);')
|
||||||
|
|
Loading…
Reference in a new issue