diff --git a/lib/entropy/db/__init__.py b/lib/entropy/db/__init__.py index a448b7812..6a6f5e9dc 100644 --- a/lib/entropy/db/__init__.py +++ b/lib/entropy/db/__init__.py @@ -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("""