Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Programming » Application development using SQL


Prepared statements

Each time a statement is sent to a database, the database server must perform the following steps:

  • It must parse the statement and transform it into an internal form. This process is sometimes called preparing the statement.

  • It must verify the correctness of all references to database objects by checking, for example, that columns named in a query actually exist.

  • If the statement involves joins or subqueries, then the query optimizer generates an access plan.

  • It executes the statement after all these steps have been carried out.

 Reusing prepared statements can improve performance
 Do not prepare statements that are used only once
 See also

Prepared statements overview