1월, 2023의 게시물 표시

unixODBC Programming - improve performance using multiple statements

이미지
 ODBC programming generally has the following structure. And the SQL query statement is processed using the statement handle. However, if there are many sql statements to be processed, the above structure should use one statement handle to process the work sequentially. However, RDBMS such as MySQL, MariaDB, MS-SQL, and DB2 are parallel structures that process multiple commands at the same time. Therefore, it is advantageous to create multiple statement handles and process them simultaneously. <parallel processing> Determining whether the RDBMS supports parallelism ODBC SDK provides an API to know the number of statement handles that RDBMS can support simultaneously. You can use the SQLGetInfo function. SQLUSMALLINT max_concur_act = - 1 ; rc1 = SQLGetInfo(dbc, SQL_MAX_CONCURRENT_ACTIVITIES , & max_concur_act, 0 , 0 ); if (SQL_SUCCEEDED(rc1)) { if ( 0 == max_concur_act) printf( "SQL_MAX_CONCURRENT unlimited or und...

unixODBC C/C++ Programming

이미지
 What is ODBC(Open Database Connectivity)? In  computing ,  Open Database Connectivity  ( ODBC ) is a standard  application programming interface  (API) for accessing  database management systems  (DBMS). The designers of ODBC aimed to make it independent of database systems and  operating systems . [ citation needed ]  An application written using ODBC can be  ported  to other platforms, both on the client and server side, with few changes to the data access code. ODBC accomplishes DBMS independence by using an  ODBC  driver  as a translation layer between the application and the DBMS. The application uses ODBC functions through an  ODBC driver manager  with which it is linked, and the driver passes the  query  to the DBMS. An ODBC driver can be thought of as analogous to a printer driver or other driver, providing a standard set of functions for the application to use, and implementing DBMS-...