Added indices on order_by fields
This commit is contained in:
parent
f275843556
commit
aa7928d35d
@ -1490,7 +1490,9 @@ class DBAPI(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
|||||||
return list(key2table[obj_key].keys())
|
return list(key2table[obj_key].keys())
|
||||||
|
|
||||||
def transaction_begin(self, transaction):
|
def transaction_begin(self, transaction):
|
||||||
## FIXME
|
"""
|
||||||
|
Transactions are handled automatically by the db layer.
|
||||||
|
"""
|
||||||
return
|
return
|
||||||
|
|
||||||
def set_researcher(self, owner):
|
def set_researcher(self, owner):
|
||||||
@ -2013,6 +2015,25 @@ class DBAPI(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
|||||||
order_by TEXT ,
|
order_by TEXT ,
|
||||||
blob TEXT
|
blob TEXT
|
||||||
);""")
|
);""")
|
||||||
|
## Indices:
|
||||||
|
self.dbapi.execute("""CREATE INDEX IF NOT EXISTS
|
||||||
|
order_by ON person (order_by);
|
||||||
|
""")
|
||||||
|
self.dbapi.execute("""CREATE INDEX IF NOT EXISTS
|
||||||
|
order_by ON source (order_by);
|
||||||
|
""")
|
||||||
|
self.dbapi.execute("""CREATE INDEX IF NOT EXISTS
|
||||||
|
order_by ON citation (order_by);
|
||||||
|
""")
|
||||||
|
self.dbapi.execute("""CREATE INDEX IF NOT EXISTS
|
||||||
|
order_by ON media (order_by);
|
||||||
|
""")
|
||||||
|
self.dbapi.execute("""CREATE INDEX IF NOT EXISTS
|
||||||
|
order_by ON place (order_by);
|
||||||
|
""")
|
||||||
|
self.dbapi.execute("""CREATE INDEX IF NOT EXISTS
|
||||||
|
order_by ON tag (order_by);
|
||||||
|
""")
|
||||||
|
|
||||||
def redo(self, update_history=True):
|
def redo(self, update_history=True):
|
||||||
## FIXME
|
## FIXME
|
||||||
|
Loading…
Reference in New Issue
Block a user