[add] heavy query caching, [add] wpm leaderboard
This commit is contained in:
@@ -75,7 +75,7 @@ local STATISTICS_ACTIVITY_SINCE_QUERY = [[
|
||||
JOIN book AS b
|
||||
ON b.id = psd.id_book
|
||||
WHERE start_time > %d
|
||||
ORDER BY start_time ASC LIMIT 1000;
|
||||
ORDER BY start_time ASC LIMIT 5000;
|
||||
]]
|
||||
|
||||
local STATISTICS_BOOK_QUERY = [[
|
||||
@@ -907,7 +907,7 @@ function SyncNinja:getStatisticsActivity(timestamp)
|
||||
local conn = SQ3.open(statistics_db)
|
||||
local stmt = conn:prepare(string.format(STATISTICS_ACTIVITY_SINCE_QUERY,
|
||||
timestamp))
|
||||
local rows = stmt:resultset("i", 1000)
|
||||
local rows = stmt:resultset("i", 5000)
|
||||
conn:close()
|
||||
|
||||
-- No Results
|
||||
|
||||
Reference in New Issue
Block a user