|
Hi Antonio, > I know I could just run the SQL statement. In > fact it comes from an ODBC connection which is > behaving too slow under some circunstances, > and we got some changes, store it in the IFS > as a set of statements, copy them to a plain, > flat file, in a file, and now I'd like to run > them "on the fly" directly. If I use dynamic > SQL results, I fear, will be as slow (or even > worse) they were when executed directly under > ODBC... Respectfully, this approach will probably not help you with better performance. You need to find out why the SQL is running slowly, and randomly tinkering is not the most efficient way to work that out. May I suggest that you do STRDBG, then run your SQL and examine the job log. When in debug mode, SQL will put hints in the job log about the decisions that the optimiser was making. It is very possible that your ODBC statements need a new index in order to speed them up. The point being that no matter how you manage to execute those SQL statements, the exact same SQL engine and optimiser will be working with them. In fact, I'd do exactly as Charles suggested and try them as dynamic statements using PREPARE. It will be somewhat easier to run performance tools and benchmarking if you eliminate the network latency of ODBC. --buck
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.