Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要从一个表中检索 200000 条记录并对每条记录进行处理。数据库是oracle。目前使用 fetch_rowarrayref 方法并对每条记录进行处理。对于大量记录,设置 5000 条记录和循环的获取限制是否有效。Mysql 有一个 LIMIT 关键字,但 oracle 没有它。不知道如何在 dbi 中做到这一点。
将 5000 条记录提取到数组中 从数组中再次提取处理,直到达到 100000 条记录
使用分页不会比你正在做的更有效。分页的目的是避免内存不足,但如果不是(并且 Oracle 不应该使用 DBD::Oracle),那么就没有任何好处。
如果此操作太慢,那么您有几个基本选项。
您的任务在获取数据并对其进行处理时看起来像分页,以编写分页类型查询
select * from ( select /*+ first_rows(25) */ your_columns, row_number() over (order by something unique)rn from your_tables ) where rn between :n and :m order by rn;
:n = 起始行 :m = 结束行 rn = 执行排序的列
有关更多信息,您可以参考链接 #1或链接 #2
我正在开发一个在线测验应用程序,它提供了所有问题的列表,当用户单击问题编号时,应显示相应的问题。当用户单击任何问题编号时,应更改问题编号单元格的背景颜色。为此,我的 JS 如下
<script> function changecolor(x) { document.getElementById(x).style.background-color="#4ead3a";
1 java - org.pentaho.reporting.libraries.resourceloader.ResourceCreationException:无法解析文档。
5 macos - Mac上JDK的路径是什么?
1 jsf - 以编程方式实例化 ValueExpressions
2 mysql - MySQL 列的唯一约束不允许插入多个 Null 和空。引擎=InnoDB
1 ios - UIPageViewController 不显示点
1 html - 遍历多级哈希引用
Reference php × 1429865 c/c++ × 756500 nginx × 49975 mongodb × 159057 mybatis × 3233 anaconda × 13410 pycharm × 14671 python × 1902243 vscode × 56040 docker × 110988 github × 49000 flask × 49129 ffmpeg × 24037 jmeter × 16910 matplotlib × 63493 bootstrap × 54641