1. Is cursor,pl/sql block executed at oracle server side ? [context : million transactions in hour and don't want to hog network traffic from client to server + want to avoid round trip time from client to server and back]
2. Cursor is having active record concept, can multiple records be active and accessed in same cursor at same time ? Take below table, all column varchar2 <ID,A,B,C,D,Status> ID - unique,not null,Long A,B,C - not null, varchar2(50) D- varchar2(150) Status- boolean/int/varchar2 (either of one) - Paired or Not. If Not paired, below cursor will fetch data and make pair. Indexed column : A,B,C individual + composite (A,B), composite (A,B,C) Now i want to make pair of 3 (or N) for all rows who is having same A,B,C So i am creating/declaring cursor, fetching data , processing in loop (for/while any) and it has fetched 9 records which are having same A,B,C now i want to process first 3 records, update D column as IDs of pair <Id,A,B,C,D,status>=<1,a1,b1,c1,null,0>.<2,a1,b1,c1,null, 0>,....,<9,a1,b1,c1,null,0> After execution i want my table to updated as below <1,a1,b1,c1,1:2:3,1>,<2,a1,b1,c1,1:2:3,1>,<3,a1,b1,c1,1:2:3,1> <4,a1,b1,c1,4:5:6,1>.<5,a1,b1,c1,4:5:6,1>.<6,a1,b1,c1,4:5:6,1> <7,a1,b1,c1,7:8:9,1>,<8,a1,b1,c1,7:8:9,1>,<9,a1,b1,c1,7:8:9,1> i.e. 1st record is paired with 2nd and 3rd record, status=1 means it is paired. For that i need to loop each cursor two times, 1st time to fetch value of 3 records and then for update it. If i can use index (like array index) or directly access other records then i can avoid this multiple loop. Incase of i want to make million records pair in real-time, is there any way out ? Raxit -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en