|
<snip> Thanks for that insight. Can SQL be used in free-form in V5R4 without the use of /EXEC and and /END-EXEC tags in C specs? Or do we still have to use /EXEC and /END-EXEC but can get rid of the C specs. We are still on V5R3 and will take some time to get there but such things are really good to know. </snip> New syntax is /Exec Sql Select ItemNumber, ItemDescription From ItemFile Where ItemNumber = :Item; No /End-Exec. Just a semi-colon. Asked my boss to get V5R4 on order. <snip> Yes IBM did give us an easy way create an LF & include only the fields you need... </snip> Except the catch. It works and increases performance a lot but if I need to bring in five tables into a program, I am going to have to define 5 different logical views unless I can do some joins. Even having a tool to do this, a lot of work and difficult to maintain. I have built system using the techniques but a ton of work. <snip> all true Alan. But does a 600 CPW i5 have the horsepower to run pure SQL instead of RPG? My guess is it does not. Fetching thru an SQL cursor must be slower than setll and reade. The mapping of more than a few SELECT columns would quickly become more cpu intensive than a byte copy into a record format. </snip> Actually the opposite is true. 1. New SQL I/O system is 5 to 7 times faster than DDS file. 2. New SQL Index system is 2 to 3 times faster than DDS indexes. 3. SQL has a new query optimizer that is a lot more efficient. 4. Reading in only the data you need is always going to be faster than reading the entire record. A lot of reasons for this primarily having to do with buffers. IBM optimizes the moves but byte moves are just not going to be significant. Record I/O is the most expensive thing in the system. 5. The other thing with SQL is that you can read multiple records into an array mapped to a user space. You cannot do that with Record I/O. If you are reading multiple tables with selects and reading in multiple records into a user space, the performance is going to be way faster. All the work is going to happen at the machine level. I gave an example in a previous post. In short, what used to be true is just not true anymore and it is only going to get better. SQL is present and the future. The only reason I see to continue a lot of record I/O is severely unnormalized databases.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.