Closed GoogleCodeExporter closed 9 years ago
Also, loading data into the rankings table should be done with 'load data
infile' instead of a shitload of insert statements, as it will run a lot faster
that way. If rankings becomes InnoDB then nobody will be blocked on the insert
at the end if the primary index is (leaderboard_id,submission_id). In fact the
key scheme in there now is pretty suboptimal as there are separate keys for
leaderboard_id and submission_id and you're always accessing them with both.
Just generate a tab-delimited tmpfile in process_ratings.py containing the
values you want to insert, pipe it through unix sort so as to sort the keys,
and load data infile that sucker and your insert will be super duper fast
without locking anything.
Original comment by andy.sloane
on 11 Sep 2010 at 5:42
We're not getting locks anymore (haven't had since we straightened out the
schema and indexes).
I agree that doing the tempfile import would be faster, but we aren't hitting
any walls on that yet.
Original comment by danie...@gmail.com
on 17 Sep 2010 at 1:07
Original issue reported on code.google.com by
donald.s...@gmail.com
on 11 Sep 2010 at 5:27