READ vs SQL SELECT, A Quick Performance Test - Part 2

We have seen the comparison between READ and SQL SELECT (with CURSOR & Fetch one record at a time) and SQL SELECT has run about 30% less time than READ (70% of READ). Click Here to see more details on this.

However, Fetching more number of Records into a Multi Occurrence Data Structure and looping the data through DS should run even faster. We would be using same Table created in Part - 1, Please see Part - 1 using the above link for these details.

We will see a sample program with FETCH multiple rows into DS and compare the results. 

Program with SELECT (PPSQL1):


Now, This program took just 2 seconds to read one million records, which is much faster than using READ (> 70% Faster) and SELECT with single record for every FETCH (> 60% Faster).


Please note that,  File Size and Data are same as used in the Part - 1.

 








Comments

Popular posts from this blog

What is the importance of User Open (USROPN) in RPGLE - IBM i

What is Deep Learning? Beyond the Basics of AI

What is Artificial Intelligence?