Databases Reference
In-Depth Information
Performance Tip
If your ODBC driver supports scrollable cursors, don't code your applica-
tion to load the ODBC cursor library. Although the cursor library provides
support for static cursors, the cursor library also creates temporary log
files on the user's local disk drive. Because of the disk I/O required to
create these temporary log files, using the ODBC cursor library slows per-
formance.
What if you don't know whether your driver supports scrollable cursors?
Using the following code ensures that the ODBC cursor library is only used when
the driver doesn't support scrollable cursors:
rc = SQLSetConnectAttr (hstmt, SQL_ATTR_ODBC_CURSORS,
SQL_CUR_USE_IF_NEEDED, SQL_IS_INTEGER);
Retrieving Data
Retrieve only the data you need, and choose the most efficient method to retrieve
that data. Use the guidelines in this section to optimize your performance when
retrieving data.
Retrieving Long Data
Retrieving long data—such as large XML data, long varchar/text, long varbinary,
Clobs, and Blobs—across a network is slow and resource intensive. Most users
really don't want to see long data. For example, consider the user interface of an
employee directory application that allows the user to look up an employee's
phone extension and department, and optionally, view an employee's photo-
graph by clicking the name of the employee.
Employee
Phone
Dept
Harding
X4568
Manager
Hoover
X4324
Sales
Taft
X4569
Sales
Lincoln
X4329
Tech
 
 
Search WWH ::




Custom Search