Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cursor vs bulk collect

francy77Mar 29 2021

Hi all,
i'm asking which one is better:
select distinct(cli.k_id,cli.n_id) BULK COLLECT INTO in_user_id_list
from clienti cli
where cli.n_user_aggiorna = 'ATI'
and cli.D_FINE_VAL is null

OR

CURSOR cur IS
SELECT distinct(cli.k_id,cli.n_id)
FROM
wiam_clienti cli,
where cli.n_user_aggiorna = 'ATI'
and cli.D_FINE_VAL is null

In the first case I need an array to copy the value retrieved while in the second not!!! In the first case I'm going to make elaboration entirely on SGA while in the second case I can use Disk I/O?? is that true?

Comments

Post Details

Added on Mar 29 2021
20 comments
4,291 views