More Optim.

This commit is contained in:
2024-10-30 16:10:53 +01:00
parent 53bc4ac219
commit 01db00b3b4
13 changed files with 1454 additions and 886 deletions

View File

@ -144,7 +144,7 @@ class DB():
yield count['count']
else:
for row in self.db.execute(
"SELECT * FROM Messages {} ORDER BY time DESC LIMIT :lim OFFSET :off".format(where_clause),
"SELECT * FROM Messages {} ORDER BY time DESC, count DESC LIMIT :lim OFFSET :off".format(where_clause),
params
):
yield self._create_row_object(row, allow_lazy=True)