View Full Version : Avoid using READE and READPE because of performance
Guest.Visitor
01-09-2003, 07:32 AM
JLMonroe wrote: > Is there any truth to avoiding READE and READPE due to performance > concerns? Are they less efficient than READ and READP? I can only address through intuition and not real answers. Read vs. ReadE: If you think about it, the difference here would be the requirement for ReadE to check the equality of the key after each read, so yes there would be a slight performance hit - and this performance hit would be borderline negligible for any but an enormous number of records. I'm not sure about blocking, but ReadE might not involve as large a record blocking level as Read would, so this would be a factor as well. Bill
Guest.Visitor
01-09-2003, 08:59 AM
Is there any truth to avoiding READE and READPE due to performance concerns? Are they less efficient than READ and READP?
Guest.Visitor
01-09-2003, 08:59 AM
It's true that SETLL/READE and READPE disable record blocking but I would only avoid using them if a particular batch job is causing a performance problem. In other words, I would never write a new batch program and not use these opcodes. You can speed up an RPG batch program by first CHAINing and then manually checking for a key break in your do loop after a READ. Yes, CHAIN still allows record blocking to occur. Chris
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.