Re: prepared statements - advantage or not

Daniel Dittmar <[email protected]>
Newsgroups gmane.comp.db.sapdb.general
Organization SAP AG
Message-ID <[email protected]>
[email protected] wrote:
> does SAP take advantage of prepared statement usage, some db's only
> simulate the ODBC calls and do not take advantage of the binding.  Trying
> to decide if all the execute directs should be replaced and what possible
> benefit.  Thanks

SAP DB does make use of prepared statements. And given the high overhead 
for parsing, using them is quite important for performance. In the 
current version, it is advisable to keep them around for as long as 
possible. Executing them only once will actually slow things down as one 
to two additional network requests are required for creating and 
dropping the statement.

The kernel in the current development tree adds an intersession 
statement cache (shared SQL).

Future versions of the programming interfaces will add a client side 
cache (already implemented in the JDBC driver). This removes the 
additional network requests mentioneed above.

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[email protected]
http://www.sapdb.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.