In my past posts I mentioned the SQL Query Engine that evaluates, plans and drives your SQL queries on the IBM i platform. For speed and performance you really should understand why using the SQE is where its at.
Here is a good article that dives more deeply into the SQE versus the CQE engines on your system:
If performance is a concern and you are still using Query/400, OPNQRYF or the QQQQry API you are blowing it big time!
Here are the key takeaways from the article:
Use SQL driven tools and programs that utilize the SQE…
Why it pays to stay current with your IBM i OS level and more importantly the Database Group PTFs that contain new features.
Utilities to monitor database performance and optimization.