help the query planner

This commit is contained in:
ed 2022-05-13 01:41:39 +02:00
parent af9000d3c8
commit 0143380306
3 changed files with 5 additions and 5 deletions

View file

@ -2413,7 +2413,7 @@ class HttpCli(object):
continue
w = r[0][:16]
q = "select k, v from mt where w = ? and k != 'x'"
q = "select k, v from mt where w = ? and +k != 'x'"
try:
for k, v in icur.execute(q, (w,)):
taglist[k] = True

View file

@ -328,7 +328,7 @@ class U2idx(object):
w = hit["w"]
del hit["w"]
tags = {}
q2 = "select k, v from mt where w = ? and k != 'x'"
q2 = "select k, v from mt where w = ? and +k != 'x'"
for k, v2 in cur.execute(q2, (w,)):
taglist[k] = True
tags[k] = v2

View file

@ -949,7 +949,7 @@ class Up2k(object):
n_done += 1
for w in to_delete.keys():
q = "delete from mt where w = ? and k = 't:mtp'"
q = "delete from mt where w = ? and +k = 't:mtp'"
cur.execute(q, (w,))
to_delete = {}
@ -987,7 +987,7 @@ class Up2k(object):
with self.mutex:
done = self._flush_mpool(wcur)
for w in done:
q = "delete from mt where w = ? and k = 't:mtp'"
q = "delete from mt where w = ? and +k = 't:mtp'"
cur.execute(q, (w,))
cur.connection.commit()
@ -1115,7 +1115,7 @@ class Up2k(object):
for k in tags.keys():
q = "delete from mt where w = ? and ({})".format(
" or ".join(["k = ?"] * len(tags))
" or ".join(["+k = ?"] * len(tags))
)
args = [wark[:16]] + list(tags.keys())
write_cur.execute(q, tuple(args))