【发布时间】:2013-03-04 20:21:50
【问题描述】:
我有一个 10 行的参数表。称为参数表。 在我的 PL/SQL 过程中,我循环了 200 万条记录。并且每次也查询这个参数表。
我想把这个参数表加载到内存中,减少I/O进程。
最好的方法是什么?
FOR cur_opt
IN (SELECT customer_ID,
NVL (customer_type, 'C') cus_type
FROM invoice_codes
WHERE ms.invoice_type='RT')
LOOP
....
...
Select data From parameter_table Where cus_type = cur_opt.cus_type AND cr_date < sysdate ; -- Where clause is much complex than this..
....
...
END LOOP;
【问题讨论】:
-
如果 Oracle 不将整个参数表保存到缓冲区缓存中,我会感到非常惊讶。我认为您试图解决一个不存在的问题(至少不是由于 10 行参数表)。
标签: database oracle plsql oracle11g database-programming