Hi,
our DB client application currently uses several threads
during startup to load data which is displayed in
different windows. Currently each thread uses its
own connection which adds up to a substantial load for the
server, especially when the number of clients is large.
Therefore I would like to use a single connection which is
shared by the threads (which do selects only, no updates
or inserts). My first tries on this failed since all
threads seem to lock up when I'm initializing my
recordset (the client is MFC based). The statement where
they hang is
AFX_SQL_SYNC(::SQLAllocStmt(m_pDatabase->m_hdbc,
&m_hstmt));
which is somewhere in the MFC source code (constructor of
CRecordset).
The documentation for the ODBC driver I'm using (Oracle
8.1.7.6) says that it is thread safe.
Can this work at all? How are the concurrent queries
executed? Do I have to expect a performance hit for
some internal thread synchronisation?
Thanks and best regards
Uwe