Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Effect of Configuration on CPU Utilization > Connections and CPU Utilization >

Multiplexed Connections

Many traditional nonthreaded SQL client applications use multiple database connections to perform work for a single user. Each database connection establishes a separate network connection to the database server.

The multiplexed connection facility for the database server provides the ability for one network connection in the database server to handle multiple database connections from a client application to this database server.

When a nonthreaded client uses a multiplexed connection, the database server still creates the same number of user sessions and user threads as with a nonmultiplexed connection. However, the number of network connections decreases when you use multiplexed connections. Instead, the database server uses a multiplex listener thread to allow the multiple database connections to share the same network connection.

To improve response time for nonthreaded clients, you can use multiplexed connections to execute SQL queries. The amount of performance improvement depends on the following factors:

To use multiplexed connections for a nonthreaded client application, you must take the following steps before you bring up the database server:

  1. Add a NETTYPE entry to your ONCONFIG file and specify SQLMUX in the connection_type field.

    The NETTYPE SQLMUX configuration parameter tells the database server to create the multiplex listener thread. When you specify SQLMUX in the connection_type field of the NETTYPE configuration parameter, the other NETTYPE fields are ignored.

  2. Set the multiplexed option (m=1) in the client sqlhosts file or registry for the corresponding dbservername entry.

    For more details on the ONCONFIG file NETTYPE entry and the sqlhosts entry, see your IBM Informix: Administrator's Guide.

  3. On Windows platforms, you must also set the IFX_SESSION_MUX environment variable.

Warning:
On Windows, a multithreaded application must not use the multiplexed connection feature. If a multithreaded application enables the multiplexing option in the sqlhosts registry entry and also defines the IFX_SESSION_MUX environment variable, it can produce disastrous results, including crashing and data corruption.

For more information on restrictions on the use of multiplexed connections, see the IBM Informix: ESQL/C Programmer's Manual and your IBM Informix: Dynamic Server Administrator's Guide.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]