作者还修改了 OLTP lua 脚本来适配新的表结构,index_updates = {
"UPDATE %s%u SET k=?,data1=? WHERE id=?",
t.INT,{t.CHAR,255},t.INT},
non_index_updates = {
"UPDATE %s%u SET c=?,data2=? WHERE id=?",
{t.CHAR,120},{t.CHAR,255},t.INT},
inserts = {
"INSERT INTO %s%u (id, k, c, pad, data1, data2) VALUES (?, ?, ?, ?, ?, ?)",
t.INT, t.INT, {t.CHAR, 120}, {t.CHAR, 60}, {t.CHAR,255}, {t.CHAR,255}},
index_selects = {
"SELECT id,data2 FROM %s%u WHERE data1=?",
{t.CHAR,255}},
update_based_on_data1 = {
"UPDATE %s%u SET data2=? WHERE data1=?",
{t.CHAR,255},{t.CHAR,255}},