Created
March 26, 2014 11:47
-
-
Save sharipov-ru/9781478 to your computer and use it in GitHub Desktop.
rethinkdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MOVE | |
# depends on slice set, here is the best results: | |
# 10K records - 1.2 seconds | |
# 100K records - 12.0 seconds | |
db.table('groups').filter(test: 1).run(conn).each_slice(1000) do |group_set| | |
db.table('archived_groups').insert(group_set).run(conn) | |
end | |
# UPDATE | |
# 10K records - 7 seconds | |
# 100K records - 62 seconds | |
db.table('groups').filter(test: 2).update(test: 3).run(conn) | |
# DESTROY | |
# 10K records - 0.7 seconds | |
# 100K records - 3.6 seconds | |
db.table('archived_groups').filter(test: 4).delete.run(conn) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment