In general, try to limit the number of times the catalog functions are called, and limit the number of rows returned.
The number of catalog function calls can be reduced by calling the function once, and storing the information at the application.
The number of rows returned can be limited by specifying a:
Remember, although an application may be developed and tested against a data source with hundreds of tables, it may be ran against a database with thousands of tables. Plan ahead.
Close any open cursors (call SQLFreeStmt() with SQL_CLOSE) for statement handles used for catalog queries to release any locks against the catalog tables. Outstanding locks on the catalog tables can prevent CREATE, DROP or ALTER statements from executing.