PeopleSoft Performance Tune-Up Tips
1. Use RowSet Fill instead of using SQL Objects Fetch mehod
For example see the below code which is written with SQL Object with fetch
local SQL &sqlOprDefn;&sqlOprDefn = createSQL("select oprid, oprdefndesc, emailid from PSOPRDEFN where emailid <> ' ' ");
while (&sqlOprDefn.fetch(&id, &name, &email)) ...do some operations...end-while;
and the same code can be written as below using Rowset Fill method
&rsOprDefn = createrowset(record.PSOPRDEFN);&rsOprDefn.fill("where emailid <> ' ' ");
for &i = 1 to &rsOprDefn.ActiveRowCounts&id = rsOprDefn[&i].OPRID.value;s&name = rsOprDefn[&i].OPRDEFNDESC.value;s&emailid = rsOprDefn[&i].EMAILID.value; ...do some operations...end-for;when you do like this, you see dramatically the performance improved.
Comments
Post a Comment