most databases support temporary stored procedures (Informing, SQL Server,
Sybase). this involves some logic from the driver.
but I have been enforcing this all the time, it is the drivers
responsibility, not Minerva's.
>There are definitely some dbs that do not cache compiled SQL... such as
>Interbase/Firebird. Until such time as they do, I think the statement
>cache will be useful. Perhaps part of the configuration of the pool could
>be to turn off the statement caching for e.g. Oracle.
God, I must be the most confusing bastard on this email list :).
Caching is useful, but only at the level that directly interacts with the
database protocol, otherwise you can not guarantee consistency between
drivers and functionality.
Minerva is actually causing resource leaks on the Oracle server by caching
statements.
>As for oracle cursors, they are not SQL cursors. Of course they had to
>hoose the same word for two different things. At the API level oracle
>cursors correspond to statements. Within the SQL language cursors
>correspond to result sets. The cursor limit in oracle is on their API
level
>cursors, so it really maps onto how many open statements a connection will
>support at one time.
well, I would say they are still SQL cursors (or similar thereof).
When you execute a statement you get a result set back, this is what oracle
calls cursor.
Oracle cursor is very much a cursor to a result of a statement.
think of how you define an Oracle cursor in PL/SQL. You do it by associating
it with a statement and executing it, then you use the cursor to navigate
the resultset, hence an oracle cursor is associated with a result set.
when you close a statement, the driver closes and associated result sets as
well (if it is a good implementation).
>structures within the size specified, otherwise it looks like a HashMap.
>You can check the 8.1.7i JDBC docs on the www.oracle.com site for more
>information. There is a whole chapter in the book on statement caching.
I've been saying this since day one. the cache sits in the driver, not on
the higher up level.
thanks for clearing that out. I hope you understand now why statements
shouldn't be cached in your application or in minerva.
Remember that the point with EJB is that you want your code to be portable
across DB servers if possible, if you want maximum performance this will of
course never happen.
However, you should treat connections, statements and result the same across
databases. that is the point with a standardized API like JDBC.
I'm such a freakin' DB geek so I even get sick of myself babbling. I have
very much enjoyed this discusion.
Have a great weekend everybody!!! TGIF!!!
Filip
~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development