回复:请教oracle db问题
first step is index. You real need to think how to create index based on your query.
becareful of your transaction, try make it as small as posible.
alter solution is dump data into temporary table, and working on temporary table. This way, usually you do not need cursor.