As noted in #355 the aggregation query (SELECT COUNT(*) FROM hits WHERE repo_id = 123) π
takes 2 MINUTES on a table with 30 Million Rows. β³
And is the reason the request/query time-out and crashes the server! π
So we're implementing hit_count π
which is just an integer counter 1οΈβ£
to return millisecond responses again. ποΈ π π
The problem is that we are temporarily ignoring the historical data in the hits table ... π
But the data is not "lost" it's just in stasis. π
So ...
Todo
Will work on this immediately after I have #355 working.
As noted in #355 the aggregation query (
SELECT COUNT(*) FROM hits WHERE repo_id = 123) πtakes 2 MINUTES on a table with 30 Million Rows. β³
And is the reason the request/query time-out and crashes the server! π
So we're implementing
hit_countπwhich is just an
integercounter 1οΈβ£to return millisecond responses again. ποΈ π π
The problem is that we are temporarily ignoring the historical data in the
hitstable ... πBut the data is not "lost" it's just in stasis. π
So ...
Todo
hit_counttableand update
countto reflect the aggregate fromhits. π§βπ»T1hand running it to takeT1wβ³(Running the script once per minute to process a single record. 1440 runs per day. 10,000/week)
Will work on this immediately after I have #355 working.