× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Am 25.08.2024 um 15:45 schrieb Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx>:

... but when using dynamic SQL.
1. Work with parameter markers (instead of creating the SQL Statement with all values)

Just create your statement and only use parameter markers for the parameters that are changing 1,247 times - all the rest, compile into the statement string.

Then PREPARE the whole statement only ONCE.

Keep in mind with each PREPARE a FULL OPEN must be performed

Yes - only do an EXECUTE statement USING :host-variables-for-?-parameter-markers, ...;

If you want to replace a SELECT INTO with that, that's also easy - use

'values (select .... ) into ?' as the dynamic statement, or
'set ? = (select .... )' as the dynamic statement

Then use also EXECUTE statement USING ... and use an host variable for the "result parameter marker".

This works quite good and could be more performant than the static statement.

HTH
Daniel


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.