reids 批量處理資料測試
阿新 • • 發佈:2019-04-01
今天做了一下測試用redis 生成 100萬個key 耗時在5s以下。
生成個數:
測試程式碼
script load "
local max= 1000000;
local i = 0;
local mcall = redis.call;
while i < max do
local ckey= 'test002' .. i .. 'value' ;
local cval= "test" .. i;
mcall('set', ckey , cval);
mcall('expire', ckey, 60);
i = i+1;
end
r