This chapter describes persistent binding and how it can improve performance. Persistent binding is a feature of Client-Library, the set of routines that executes Embedded SQL statements. Persistent binding improves a program’s performance by enabling the Embedded SQL precompiler to create more efficient code.
Persistent binding is optional: It takes effect if you request it when you precompile your program. Persistent binding benefits only certain types of Embedded SQL programs.
To understand this chapter, you should be familiar with host variables, cursors, dynamic SQL, and precompiler options. Refer to:
Chapter 4, “Using Variables” for information about host variables.
Chapter 6, “Using Transact-SQL Statements” for information about cursors.
Chapter 7, “Using Dynamic SQL” for information about dynamic SQL.
The Open Client and Open Server Programmers Supplement for information about precompiler options and about starting the precompiler.
You need not understand Client-Library to use persistent binding in Embedded SQL. However, understanding Client-Library’s command structures, ct_bind routine, and ct_fetch routine can help you understand why persistent binding works as it does in Embedded SQL.
The general function of the command structures ct_bind and ct_fetch are described briefly in this chapter. For complete descriptions, refer to the Open Client Client-Library/C Programmers Guide and the Open Client Client-Library/C Reference Manual.