oracle - Individual Record Logging While Handling Large no of records -


i having procedure assign products against existing list of orders.

for rec_ord in(select order_id,order_prop1,order_prop2,<some more columns>                 order_master <some conditions>) loop <step-1:do processing on order_prop1,order_prop2> [log processing result] rec_prod in (select prod_id,prod_prop1,prod_prop2,<some more columns>                   product_master                   prod_prop1 = ord_prop1                  , <some conditions>) loop <step-2:do processing using prod_prop2 , order_prop2> [log processing result] <decide whether assign or not> [log assignment or non-assignment reason] end loop end loop 

i tried below 2 methods.

  1. bulk collect:i combined step-1&2 in single query joining order_master & product_master. , using bulk-collect insert assignment. losing logging & tracking of individual record.
  2. for loop: used loop given above. taking way long. increasing execution time many times.

i want processing fast along logging & tracking. appreciated.

thanx in advance.

for me, problem here seems try combine mass-row processing single-row logging. leads poor performance, oracle has switch between pl/sql , sql engine constantly.

therefore, feasible solution collect logging information in array type t_logs table of reasonable_rec_log_type , pass logging procedure @ once or in chunks time time (in outer loop?), depending on prospective table dimensions.

if decide bulk collect solution, using forall (multiple times) possible if did inserts logging yourself, not speed when calling procedure - it's meant generate dml statements have been executed 1 row @ time , execute them altogether.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -