As you design and code your application, you can take advantage of certain database manager features and tools to prototype portions of your SQL code, and to improve performance. For example, you can do the following:
This allows you to define and manipulate information stored in a database table, index, or view. You can add, delete, or update information as well as generate reports from the contents of tables. Note that you have to minimally change the CLP syntax for some SQL statements in order to use host variables in your program. Host variables are used to store data that is output to your screen using the CLP. In addition, some embedded SQL statements (such as BEGIN DECLARE SECTION) are not supported by the CLP as they are not relevant to that environment. See Table 22 to see which SQL statements are not supported by the CLP.
You can also redirect the input and output of command line processor requests. For example, you could create one or more files containing SQL statements you need as input into a command line processor request, thereby not having to keep retyping the statement.
For information about the command line processor, see the Command Reference.
For information about how to use the Explain facility, see the Administration Guide.
You can update some system catalog views containing statistical information used by the SQL optimizer. Some columns in these views may be changed to influence the optimizer or to investigate the performance of hypothetical databases. You can use this method to simulate a production system on your development or test system and analyze how queries perform.
For a complete description of each system catalog view, see the appendix in the SQL Reference. For information about system catalog statistics and which ones you can change, see the Administration Guide.