Hi
I am trying to use less connections to the database. I turn connection pooling on.
What i do is open a storedprocedure and copying is to a buffer before sending back to the client.
With disconnectedMode on + pooling will it be slower or will pooling of connections keep the speed up.
Whats would be best way of using it.
Connection.Active := True;
Get Storedprocparams
Do procedure
Connection.Active := False
Copy data
DataSet.Close;
All the best
Mike
Performance + DisconnectedMode
Disconnected mode with Pooling is useful in the following cases:
- there are several connections in the application;
- database activity of the application is uneven.
These options help to decrease database connections count, with minimum performance loss.
In order to choose the best approach, it is necessary to know structure of the application an conditions in what it will work.
- there are several connections in the application;
- database activity of the application is uneven.
These options help to decrease database connections count, with minimum performance loss.
In order to choose the best approach, it is necessary to know structure of the application an conditions in what it will work.
Yes, you are right. After the TMSStoredProcedure is executed, and TMSConnection becomes inactive, the connection is put to the pool, but not actually destroyed.
The second execute of the StoredProcedure will not lead to the new connection establishing if the following two conditions are held:
- connection parameters were not changed;
- connection put to the pool is steel alive (see the TMSConnection.PoolingOptions.ConnectionLifetime for more information).
In this case the connection will be taken from the pool.
The second execute of the StoredProcedure will not lead to the new connection establishing if the following two conditions are held:
- connection parameters were not changed;
- connection put to the pool is steel alive (see the TMSConnection.PoolingOptions.ConnectionLifetime for more information).
In this case the connection will be taken from the pool.