skip to main content
Reference : Designing ODBC Applications for Performance Optimization : Using Catalog Functions : Caching Information to Minimize the Use of Catalog Functions
  

Try DataDirect Drivers Now
Caching Information to Minimize the Use of Catalog Functions
To return all result column information mandated by the ODBC specification, a driver may have to perform multiple queries, joins, subqueries, or unions to return the required result set for a single call to a catalog function. These particular elements of the SQL language are performance expensive.
Although it is almost impossible to write an ODBC application without catalog functions, their use should be minimized. By caching information, applications can avoid multiple executions.
For example, call SQLGetTypeInfo once in the application and cache the elements of the result set that your application depends on. It is unlikely that any application uses all elements of the result set generated by a catalog function, so the cached information should not be difficult to maintain.