Post
Topic
Board Meta
Merits 1 from 1 user
Re: Tool to run online SQL queries over Full Merit Data
by
Piggy
on 09/11/2018, 13:53:09 UTC
⭐ Merited by mainconcept (1)
I get an error when I use this query:


Code:
SELECT MAX(result.total) as "Total Merit", result.toID as "Top merit receiver", result.SubBoard as "Board" FROM (
SELECT toid, SubBoard, SUM(Merit) AS total
FROM meritdata as m
WHERE m.SubBoard in (SELECT SubBoard FROM meritdata GROUP BY SubBoard)
GROUP BY toid, SubBoard
ORDER BY SubBoard,total Desc) AS result
GROUP BY SubBoard
ORDER BY result.total Desc;

Error:
Code:
Uncaught abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1
which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this

The local section query works fine. Probably a too resource intensive task.

Try to run it this way and refresh the page first, as i see after that error not even a normal query seems to be working anymore (probably cannot recover from it):

Code:
SELECT MAX(result.total) as "Total Merit", result.SubBoard as "Non-Local board" FROM (
SELECT toid, SubBoard, SUM(Merit) AS total
FROM meritdata as m
GROUP BY toid, Board
ORDER BY Board,total Desc) AS result
GROUP BY SubBoard
ORDER BY result.total Desc



The data is updated to the 9th of November