Can some one help me with an answer for the memory taken for each statement cached in Websphere 220.127.116.11 if pooling and DataSource is used? I am supposed to set a value and the default is 10 connections. I want to know how much memory is taken for each of the statements (preapared) cached. I am sure this is based on System memory available, but would like to know if it is simple bytes based on the Statement text(may not be that simple).
Another question: What is the mechanism/logic to discard Statements from cache? Is it FIFO or least used logic in case of Webspehere, when websphere has to discard some of the statements?
Inder, You are correct that it is more than just bytes in the SQL. I don't know of any tool that would tell you the size. You could try running a test with 10 prepared statements and then a test with 11 to compare the difference in memory usage.
Websphere disgards statements in least recently used order.