批量新增报错PSQLException: PreparedStatement can have at most 65,535 parameters.
最佳答案 问答题库758位专家为你答疑解惑
报错信息:
org.postgresql.util.PSQLException: PreparedStatement can have at most 65,535 parameters. Please consider using arrays, or splitting the query in several ones, or using COPY. Given query has 661,068 parameters
; SQL []; PreparedStatement can have at most 65,535 parameters. Please consider using arrays, or splitting the query in several ones, or using COPY. Given query has 661,068 parameters; nested exception is org.postgresql.util.PSQLException: PreparedStatement can have at most 65,535 parameters. Please consider using arrays, or splitting the query in several ones, or using COPY. Given query has 661,068 parameters
翻译:
这个错误是因为PreparedStatement最多只能有65,535个参数。你可以尝试使用数组、将查询拆分成几个部分或者使用COPY方法来解决这个问题。
导致原因:
数据入湖,一次性批量新增一万多条数据,加不进去,报错,没想到PreparedStatement还有限制。
解决方案:
限制批量添加的条数,一次性加两千条,多执行几次。
99%的人还看了
相似问题
- conda创建pytorch环境报错
- Python通过selenium调用IE11浏览器报错解决方法
- kafka本地安装报错
- 【BUG】第一次创建vue3+vite项目启动报错Error: Cannot find module ‘worker_threads‘
- git 构建报错
- Docker build报错总结,版本过新大避雷!
- Mongodb3.4升级高版本mongoTemplate.executeCommand报错The cursor option is required
- duplicate复制数据库单个数据文件复制失败报错rman-03009 ora-03113
- 安装第三方包报错 error: Microsoft Visual C++ 14.0 or greater is required——解决办法
- 邮件|gitpushgithub报错|Lombok注解
猜你感兴趣
版权申明
本文"批量新增报错PSQLException: PreparedStatement can have at most 65,535 parameters.":http://eshow365.cn/6-32911-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!
- 上一篇: 学电脑编程零基础,计算机编程入门先学什么
- 下一篇: Uni-App 快捷登录