sybase大数据量插入性能怎么样?怎么样提高呢?

Armstrong刘-大壮 Armstrong刘-大壮 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我目前在做的需求是需要把后台生成的csv文件导入到sybase数据库,因为每条数据需要判断插入得目标表,只能每条读取了之后插入。我采取的是自己判断组装批插入的sql,例如:insert into WG_float_202007 (ObjectId, AttributeId, Seconds, Nanoseconds, Type, ErrorValue, Value) values(527433753,630,1592477964,74700000,'r',0,953.000000) union all (select 527433753,630,1592477924,984800000,'r',0,940.000000) union all (select 527433753,630,1592477864,861200000,'r',0,920.000000) union all (select 527433753,630,1592477937,17500000,'r',0,944.000000) union all (select 527433753,630,1592477894,922500000,'r',0,930.000000) union all (select 527433753,630,1592477855,842200000,'r',0,917.000000)这样的,我能找到的资料只有这一种批插入得方式,但是速度也不快,每秒最多才2k条,而且一次插入数据过多会报“There is not enough procedure cache to run this procedure, trigger, or SQL batch. Retry later, or ask your SA to reconfigure ASE with more procedure cache.”的错!我用的是jconnection4,sybase15.7版本,Java工程搞的。请教一下对于几百万条数据连续插入需要怎么搞,sql怎么写,怎么优化。
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
Armstrong刘-大壮
Sybase 2,598 成员 25,608 内容