| Author |
Is there a limit to # of Statements over a Connection object
|
Vasilis Karas
Greenhorn
Joined: Mar 16, 2004
Posts: 24
|
|
|
Is there a limit or performance pitfall I need to be aware of in terms of how many Statement(PreparedStatements) objects I should create over one Connection object? Currently I have a singleton class where my DB calls are made from. When instantiating the class through static method, I pass in a Connection object that creates about ten preparedstatement objects. Is there a limit of how many Preparedstatements I should restrict a Connection to?
|
 |
Al Tam
Greenhorn
Joined: Nov 27, 2004
Posts: 5
|
|
It depends on the database that you are using. Which DB are you using? Oracle?
|
 |
Vasilis Karas
Greenhorn
Joined: Mar 16, 2004
Posts: 24
|
|
Al, thanks for responding. We're using MS SQL server. thanks again. VK
|
 |
Caitlin Fourie
Greenhorn
Joined: Oct 03, 2003
Posts: 3
|
|
Is it true that a connection is limited in the amount of statements it can handle according to type of database? Surely a connection, as long as it is kept alive and statements are correctly closed, can handle an unlimited amount of PreparedStatement and Statement objects regardless of db type, or how else would pooled connections work efficiently? I'm interested to know which particular databases do impose limits... maybe I've been using Connection objects incorrectly all along...
|
 |
Vasilis Karas
Greenhorn
Joined: Mar 16, 2004
Posts: 24
|
|
|
I'm not sure but the way I've built each singleton class with ten or more PreparedStatements over a connection I was growing concerned.
|
 |
 |
|
|
subject: Is there a limit to # of Statements over a Connection object
|
|
|