Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Replacing a subselect with Collections
Hi all oracle users,
I have a cursor which fetches a few thousand records.
Inside it I have a subselect which is used for decoding one field.
CURSOR snap_crs IS
SELECT decode (snap.id, 1,
(select code_ptr from anag_ptr where desc_ptr = snap.ptr_a),
(select code_ptr from anag_ptr where desc_ptr = snap.ptr_b)
), ..... other fields....
My question is: since * anag_ptr * is a static table (doesn't ever
change),
is it worthy to replace the subselect with values taken from a
Collection ?
Having a Java background I would use an Hashtable to insert couples (code_ptr,desc_ptr)...but what about pl/sql ? can I do the same ?
Thanks a lot
Francesco
Received on Wed Feb 23 2005 - 03:26:47 CST