6 The DB2 Entity Framework Data Provider : Performance Considerations

Performance Considerations
The performance of your application can be affected by the values you set for connection string options and properties. See “Performance Considerations” for a description of the connection string options that are common with the DB2 ADO.NET data provider.
The Entity Framework data provider uses Entity Framework contexts to provide some functionality:
Cursor Description Cache: The data provider uses Entity Framework contexts to cache cursor description information when requested to execute a Select statement that exactly matches a previously executed Select statement. Caching the cursor descriptions allows the data provider to optimize the execution of subsequent executions of the same statement, reducing the number of network round trips required. In this case, this option should be set to True. If the application does not execute the same Select statement repeatedly, this option should be set to False. Otherwise, performance is degraded because memory is used unnecessarily.
CurrentUserAffinityTimeout: Increasing the value of this property can increase the chances that a connection with the same CurrentUser exists in the pool. However, when set too high relative to other CurrentUserAffinityTimeout values, the connection pool might have to create new connections, which is more performance-expensive than reauthenticating an existing connection. Use the DDTek_Connection_Reauthenticate stored procedure to achieve similar functionality. See “Using Pseudo Stored Procedures” for information on using this functionality in an ADO.NET Entity Framework application.