[OJB-developers] RE: ORA-01000 cursor
Brought to you by:
thma
From: Galvin H. <gk...@ya...> - 2002-06-11 17:32:41
|
Looking at the code, you are correct, it seems the prepared statements are cached and reused for: inserts deletions updates queries Given that Oracle 8i by default has only 50 open cursors, given a large amount of queries (reads) I was experiencing an ORA-01000. Although a DBA could probably come in and bump up the open cursor count for a particular DB instance, I think that the amount of open cursors might be reduced if the HashMap used a LRU scheme to discard prepared statements. I've looked at the statement code thoroughly and, correct me if I'm wrong, we re-use statements. We create a certain amount, and we store them in a statement hashmap. If you close the statement, a lot of tests will fail. Try it. I don't think oracle will eventually crap out, unless you have a HUGE amount of objects and thus statements. I question the value of caching statements as this is something the driver should probably do anyway. A future refactoring could accomplish this. The J2EE version uses cached sql strings instead of statements, and relies on the driver or app server to cache statements. m __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com |