百万量级key value怎样快速插入shared

19 views
Skip to first unread message

fc1...@gmail.com

unread,
Jun 23, 2022, 1:38:00 AMJun 23
to openresty
咨询一下,百万量级key value怎样快速插入shared,现在要8分钟左右。

Junlong li

unread,
Jun 23, 2022, 3:27:40 AMJun 23
to openresty
需要给一个能够复现的例子

On Thursday, June 23, 2022 at 1:38:00 PM UTC+8 fc1...@gmail.com wrote:
咨询一下,百万量级key value怎样快速插入shared,现在要8分钟左右。

fc1...@gmail.com

unread,
Jun 23, 2022, 5:35:07 AMJun 23
to openresty
{
    "Status": "0",
    "Msg": "ok",
    "Lat": 39.58,
    "Lon": 116.3,
    "Data": {
        "IfPre": true,
        "PreTypeCode": 1,
        "PreType": "雨",
        "dBZ": [0, 27, 32, 32, 30, 32, 32, 32, 32, 29, 28, 28, 32, 32, 32, 32, 28, 22, 0, 0],
        "Interval": 6,
        "Description": "即将开始下小雨,时大时小",
        "Datetime": "2022-06-23T16:54:00+08:00",
        "Epochtime": 1655974471,
        "MobileLink": "https:\/\/x.xxxxx.com\/xxxx.do?xxx=xxx&xxx=xxx&z=wx49nmr4&phrase=即将开始下小雨,时大时小"
    }
}
,将这个json解析成csv,然后复制100万行,然后lua解析csv,for循环set sharddict。
Message has been deleted

Junlong li

unread,
Jun 23, 2022, 5:40:32 AMJun 23
to openresty
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
你应该直接写一个可以复现的脚本,最小化大家的工作量

fc1...@gmail.com

unread,
Jun 23, 2022, 5:53:44 AMJun 23
to openresty
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
找到问题了,新加的字段太长了,整个value增加了一倍长度,插入时间也增加了一倍。
Reply all
Reply to author
Forward
0 new messages