Add an index on filename on songs table. Particullary, this heavily speed up the 'Add folder' usecase

This commit is contained in:
Arnaud Bienner 2011-11-12 19:33:50 +01:00
parent df8bafe161
commit 2511a97077
3 changed files with 5 additions and 1 deletions

View File

@ -334,5 +334,6 @@
<file>clementine-spotify-public.pem</file>
<file>icons/22x22/user-away.png</file>
<file>icons/32x32/search.png</file>
<file>schema/schema-35.sql</file>
</qresource>
</RCC>

View File

@ -0,0 +1,3 @@
CREATE INDEX idx_filename ON songs (filename);
UPDATE schema_version SET version=35;

View File

@ -33,7 +33,7 @@
#include <QVariant>
const char* Database::kDatabaseFilename = "clementine.db";
const int Database::kSchemaVersion = 34;
const int Database::kSchemaVersion = 35;
const char* Database::kMagicAllSongsTables = "%allsongstables";
int Database::sNextConnectionId = 1;