[entropy.db] EntropyRepository: create index for trashedcounters

This commit is contained in:
Fabio Erculiani
2012-07-19 21:08:38 +02:00
parent 3dc413e80f
commit 2f9fafc128
+9
View File
@@ -5654,6 +5654,7 @@ class EntropyRepository(EntropyRepositoryBase):
if not self.__indexing:
return
self._createTrashedCountersIndex()
self._createMirrorlinksIndex()
self._createContentIndex()
self._createBaseinfoIndex()
@@ -5679,6 +5680,14 @@ class EntropyRepository(EntropyRepositoryBase):
self._createCategoriesIndex()
self._createCompileFlagsIndex()
def _createTrashedCountersIndex(self):
try:
self._cursor().execute("""
CREATE INDEX IF NOT EXISTS trashedcounters_counter
ON trashedcounters ( counter )""")
except OperationalError:
pass
def _createMirrorlinksIndex(self):
try:
self._cursor().execute("""