Databases Reference
In-Depth Information
MySQL, you know the driver emulates scrollable cursors, but for other databases,
it's more complicated. See “Using Scrollable Cursors,” page 36, for details about
which common databases support server-side scrollable cursors and how data-
base drivers emulate scrollable cursors.
Performance Tip
In general, do not write code that relies on the number of result rows
from a query because drivers often must retrieve all rows in a result set
to determine how many rows the query will return.
Choosing the Right Data Type
When designing your database schema, it's obvious that you need to think about
the impact of storage requirements on the database server. Less obvious, but just
as important, you need to think about the network traffic required to move data
in its native format to and from the ODBC driver. Retrieving and sending certain
data types across the network can increase or decrease network traffic.
Performance Tip
For multiuser, multivolume applications, billions, or even trillions, of net-
work packets can move between the driver and the database server over
the course of a day. Choosing data types that are processed efficiently
can incrementally provide a measurable gain in performance.
See “Choosing the Right Data Type,” page 34, for information about which
data types are processed faster than others.
Updating Data
Use the guidelines in this section to manage your updates more efficiently.
Using SQLSpecialColumns to Optimize Updates and Deletes
Many databases have hidden columns, named pseudo-columns, that represent a
unique key associated with every row in a table. Typically, pseudo-columns in a
 
 
 
Search WWH ::




Custom Search