Cached statements statistics
For reading data with oracle 9.2 thin JDBC drived I got following statistics
while reading lots of datya (lots of smal reads on m:n as two 1:n):
Kodo connection pooling : 14sec
Third party conn pooling with no statement cahing: 22sec
Third party conn pooling with oracle statement cahing: 17sec.
(I wrapped OracleConnectionPoolDataSource and set pool size on each
getPooledConnection() call)
Some more statistics:
Kodo 2.2.3 for the same op with 3-party pooling produced exactly the same
result as 2.4 with no statement caching - 22sec
So statement caching gives pretty good performance boost but real speed
could be obtained if Kodo can implement some SQL optimization like batch
reads (ie you have object A which references B, you read 100 of As with one
SQL but then execute hundred of reads to read 100 of Bs. batch read allows
to join A and B in one SQL and read them both at once) Kodo 2.5 :-)
One particular very common case where batch reading would shine is M:N with
attributes (often implemented as two 1:N)
But my priority is with better concurrency - multiple JDO_LOCKs especially
for collections.
"Alex Roytman" <[email protected]> wrote in message
news:aodj57$oq5$[email protected]..
For reading data with oracle 9.2 thin JDBC drived I got followingstatistics
while reading lots of datya (lots of smal reads on m:n as two 1:n):
Kodo connection pooling : 14sec
Third party conn pooling with no statement cahing: 22sec
Third party conn pooling with oracle statement cahing: 17sec.
(I wrapped OracleConnectionPoolDataSource and set pool size on each
getPooledConnection() call)
Similar Messages
-
The mapviewer 10.1.2 UG talks about turning on the report_stats option in the conf file to dump out the cache stats every 5 minutes. Where does this data dump to? I assumed it would be the default log file, but I don't see this happening. What am I missing?
Thanks, I switched the logging to finest and now I'm seeing the information being written. Another question, everytime is reports, it always reports:
MapViewer Spatial Data Cache info (upper limit=524288kb):
In Memory Cache Size: 0 kb
Nothing ever seems to be saved in cache. Why is this? -
Web cache detail statistics monitor page missing
Hi,
After installed the 9iAS on SUN Solaris, I can start the web cache statistics page, but I cannot click into the details statictis page, it seems missing.
Now, I get this description.html page, but I don't know where to put it? Does anyone can tell me where this page be placed and any config. need to set??
Thanks in advance!!Hi,
First of all, the detailed statistics page
is only meant for internal diagnostics and
is not a supported feature.
All of the useful statistics information
can be viewed from Oracle WebCache Manager:
http://<webcache hostname>:<admin port>/webcacheadmin
Once in there, the bottom 3 links on the left
frame contain all the exposed statistics
data of the webcache and the web servers.
Each page also has context sensitive help
describing the data.
The broken links on the detailed stats page
are simply links to a help file (description.html) describing the different
fields. To make the links work, you need to
create a subdirectory "docs", under:
<webcache installation dir>/docs/
Put the file in the subdirectory, so it's at:
<webcache installation dir>/docs/docs/
Restart WebCache.
BTW, how did you get hold of the
description.html file?
null -
Hi experts
i need to know statistics of my cache server for last week. i can see the statistics for the current day through CSADMIN. is there any way i can find the statistic for few days back.
Bes RegardsHi
The difference is: This option is showing the active entries in the cache.
For checking the whole entries that were cached in buffer. You have to do this option
Do this Display --> Settings --> Select ALL Entries.
Edited by: Deepak Sharma on Jul 8, 2008 10:36 AM -
Template for United States Statistics
I would like to know if there is a template I can use as a starting point to show statistics across the country, using states of different colors? This is for a documentary film. I'd like to not start this from scratch because I know this is done on a routine basis. Any ideas how I can accomplish this. It doesn't have to be Flash, I just thought that was a possible starting place and it would be kind of great if it was somewhat animated.
someone else may have helpful info here, but you're usually better off searching google for what you want.
-
hi
when i log on to database and i issue an update statement , the blocks are loaded into buffer cache and buffers marked as dirty
after that i issue commit statment, what is the state of buffers?
are buffers still dirty?
what is the diffrence between state of buffers before and after commit statment?
thanks in advance
Edited by: user3683976 on Dec 6, 2008 3:42 PM
Edited by: user3683976 on Dec 6, 2008 4:43 PMuser3683976 wrote:
hi
when i log on to database and i issue an update statement , the blocks are loaded into buffer cache and buffers marked as dirty
after that i issue commit statment, what is the state of buffers?
are buffers still dirty?You need to read the Concepts guide IMHO. When you issue a commit,the state of the buffers depends upon where they are?There may be very well chance that the buffers ,before getting a commit are checkpointed to the datafile.If that would be the case than even after the commit,in the datafile,they will remain as dirty only. I guess that's logical because Oracle never got a chance to clear their transaction header to clean out the status of the transction. This cleaning willl be done next time when the query will pull them out from the datafile and will bring in the cache. The behavior is called delayed block cleanout.
If the buffers are in the cache only,they will be cleaned immediately ,hence will be marked as clean buffers.
what is the diffrence between state of buffers before and after commit statment?BEefore commit, they are dirty or inconsistent. After commit,they are clean or consistent.
HTH
Aman.... -
Hi gurus,
I have been trying to create a statement that returns the use of SQL statements against the intsance using the v$session and v$db_object_cache.
can any one please help me out.
Thanks a chunkPT? The chemistry symbol for Platina? ;-)
Do you think that inserting records directly in the datadictionary is going to make a difference? It might be a better idea to find out why the DB is slow during peak hours. Trace it, use Statspack, whatever. The main thing is to find out why it is slow. -
Is there a way to get the statistics for identity maps such as the number of objects of each type, avg. size and total size?
Thanks
RussSession defines the printIdentityMaps method. You could also access the internal IdentityMapManager getIdentityMapManager() to get more specific information.
* PUBLIC:
* Used to print all the objects in every identity map in this session.
* The output of this method will go to the Session's log.
public void printIdentityMaps(); -
Plz help. How disable caching SQLJ statement on WebLogic server 10.3?
Plz help.
How disable caching statement by SQLJ on WebLogic server?
what the actual problem:
1. create or replace view vtest as select object_name from dba_objects where rownum<200
2. test.sqlj
#sql dx testIterator = {
select object_name from vtest
int cnt=0;
while( testIterator.next() ){
cnt++;
System.out.println("Count: "+cnt);
3. Restart WebLogic and deploy project
4. Run test on server, in log file
"*Count: 199*"
5. create or replace view vtest as select object_name from dba_objects where rownum<10
6. Run test on server, in log file
"*Count: 199*"
7. Restart WebLogic
8. Run test on server, in log file
"*Count: 9*"Hi bud,
Have you tried using WLST for what you are trying to achieve?
Please take a look at the following links:
http://docs.oracle.com/cd/E11035_01/wls100/config_scripting/domains.html
http://docs.oracle.com/cd/E13222_01/wls/docs91/config_scripting/domains.html
http://docs.oracle.com/cd/E13179_01/common/docs21/interm/config.html
Hope this helps.
Thanks,
Cris -
How does BerkeleyDB know when cached results from stat function are valid ?
Something curious: I have a berkeley database about 2G in size and a program that (1) opens the database, not DB_RDONLY; (2) calls stat(), without DB_FAST_STAT; (3) calls sync(); (4) calls close().
Running this program the first time takes a good amount of time in the stat() function - 20 minutes at least - and thrashes the disk all that time. So it's trawling the database to get record counts etc.
Running the program again takes only a few seconds so clearly the database is caching those stats and knows they're up to date - makes sense.
What's odd though is why the stats weren't known to be up to date on the first run. The database was actually copied from another box where the last thing to happen was a run of the same program. So it should have had up-to-date stats cached in it.
It's as if the cached values are somehow invalidated by moving the database to another machine. Why would that happen ? Where are the cached stats held and how does berekelyDB decide when they're up to date ?I still cannot solve this problem, but I have some more observations:
1) yes it is a JApplet, and yes, the data streaming is performed in a separate thread.
2) Wireshark sniffing shows that data sent out by the PHP datasource on the server is sent immediately, and is not buffered (am using ob_start(), ob_flush() and flush() alls in the PHP script).
3) On Windows Vista, using Internet Explorer or Firefox, there is a constant 30 second delay before the Applet returns from this line: InputStream is = url.openStream();
4) After this 30 seconds, data appears in the Applet, but it can be seen also with java console debug prints that the data seems to be buffered. The newest data shown in the Applet is not the newest data sent to the client by the PHP datasource script.
5) On a SUSE Linux client, the Applet works as it should, there is no delay time in showing the data.
It appears as if there is on Windows a buffering of data which I do not wish to have and which does not occur on Linux. I need to find out how to get the URL openStream() call to return immediately allowing the initial data to be read and shown on the Applet. And I need to remove the buffering of data so that the data can be shown on the Applet when it arrives.
Can anyone help? Why does this work on Linux but not on Windows, and what can I do, at best within the Java code, to get the Applet to work on Windows as it does on Linux?
Thanks!
Steve, Denmark -
(statement cache size = 0) == clear statement cache ?
Hi
I ran this test with WLS 8.1. I set to the cache size to 5, and I call a servlet
which invokes a stored procedure to get the statement cached. I then recompile
the proc, set the statement cache size to 0 and re-execute the servlet.
The result is:
java.sql.SQLException: ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package "CCDB_APPS.MSSG_PROCS" has been invalidated
ORA-04065: not executed, altered or dropped package "CCDB_APPS.MSSG_PROCS"
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 1
which seems to suggest even though the cache size has set to 0, previously cached
statements are not cleared.
Rgs
ErikGalen Boyer wrote:
On Fri, 05 Dec 2003, [email protected] wrote:
Galen Boyer wrote:
On 14 Nov 2003, [email protected] wrote:
Hi
I ran this test with WLS 8.1. I set to the cache size to 5,
and I call a servlet which invokes a stored procedure to get
the statement cached. I then recompile the proc, set the
statement cache size to 0 and re-execute the servlet.
The result is:
java.sql.SQLException: ORA-04068: existing state of packages
has been discarded ORA-04061: existing state of package
"CCDB_APPS.MSSG_PROCS" has been invalidated
ORA-04065: not executed, altered or dropped package
"CCDB_APPS.MSSG_PROCS" ORA-06508: PL/SQL: could not find
program unit being called ORA-06512: at line 1
which seems to suggest even though the cache size has set to
0, previously cached statements are not cleared.This is actually an Oracle message. Do the following test.
Open two sqlplus sessions. In one, execute the package.
Then, in the other, drop and recreate that package. Then, go
to the previous window and execute that same package. You
will get that error. Now, in that same sqlplus session,
execute that same line one more time and it goes through. In
short, in your above test, execute your servlet twice and I
bet on the second execution you have no issue.Hi. We did some testing offline, and verified that even a
standalone java program: 1 - making and executing a prepared
statement (calling the procedure), 2 - waiting while the
procedure gets recompiled, 3 - re-executing the prepared
statement gets the exception, BUT ALSO, 4 - closing the
statement after the failure, and making a new identical
statement, and executing it will also get the exception! JoeI just had the chance to test this within weblogic and not just
sqlplus.Note, I wasn't using SQL-PLUS, I wrote a standalone program
using Oracle's driver...
MY SCENARIO:
I had one connection only in my pool. I executed a package.
Then, went into the database and recompiled that package. Next
execution from app found this error. I then subsequently
executed the same package from the app and it was successful.And this was with the cache turned off, correct?
What the application needs to do is catch that error and within
the same connection, resubmit the execution request. All
connections within the pool will get invalidated for that
package's execution.Have you tried this? Did you try to re-use the statement you had,
or did you make a new one?
Maybe Weblogic could understand this and behave this way for
Oracle connections?It's not likely that we will be intercepting all exceptions
coming from a DBMS driver to find out whether it's a particular
failure, and then know that we can/must clear the statement cache.
Note also that even if we did, as I described, the test program I
ran did try to make a new statement to replace the one that
failed, and the new statement also failed.
In your case, you don't even have a cache. Would you verify
in your code, what sort of inline retry works for you?
Joe -
Statement cache size - application changes withouth restart
Hi, I would like to ask, how can I disable statement cache withouth restart.
If I set statement cache size to "0" and push button "Apply chanes", I got
message "No restart are necessary". Does it mean, that statement cache is
flushed? There is production environment and I would like to make sure
about it.
Thank you in advance.
Vladislav Rames, WLS 10.3.4Yes, setting the statement cache size is dynamic. A running server will close all cached
statements and do no more caching, as soon as you set the cache size to zero. -
How to use "OCI Statement Cache - OCIStmtPrepare2" with XA ? Tuxedo ?
Hi All
Is there is a way to use "OCI Statement Cache - OCIStmtPrepare2" with tuxedo and XA ?
We have found out that a lot of the "CPU time" is spent by OCIStmtPrepare. We have 8 frequent statements (with bind) that we would like to cache .
Based on the following ORACLE paper, our interpenetration is that it is not allowed to cache statements when using XA.
*"Oracle® Database Advanced Application Developer's Guide 11g Release 1 (11.1)" - "Developing Applications with Oracle XA"*
Highlights from the ORACLE paper.
"When used in an Oracle XA application, cursors are valid only for the duration of the transaction. Explicit cursors must be opened after the transaction begins, and closed before the commit or rollback."
"Ensure that the application resets the fetch state before ending a transaction. In general, use release_cursor=no. Use release_cursor=yes only when you are certain that a statement will execute only once."
Regards
TechSginconfirmed by ORACLE.
XA connections don't support OCIStmtPrepare2 (statement caching) -
How to retrieve a prepared statement from prepared statement cache?
Hi All,
I have created the connection pool during application server startup. The connection pool are getting created successfully. I have also created the prepared statements and stored as part of each connection in the connection pool.
can anyone please tell me on how do I retrieve a prepared statement from prepared statement cache from a connection object.
Any pointers to info source will be REALLY appreciated.
Many Thanks in Advance,
C R BaradwajRaghuram Bharatwaj C wrote:
Hi Joe,
I have created a connection poool in my startup class and created the
neccessary prepared statements for a each connection. I have 10 prepared
statements to be created for each connection. I have created all the 10 prepared statements using the loop as mentioned below
String [] epc_stmts;
private java.sql.PreparedStatement[] _pstmts;
if (epc_stmts!= null)
_pstmts = new PreparedStatement [len = epc_stmts.length];
for (i=0; i<len; i++)
_pstmts[i] = db.prepareStatement (epcstmts);
I have closed the connection after the prepared statements are created.
Now, How do i access a prepared statement from the connection object.
Nothing. Are you talking about a WebLogic pool? If so, then therafter,
whenever your application gets a pool connection, when it calls
prepareStatement() with the same SQL as you prepared those statements,
it will get a cached statement. Your array is unnecessary.
Joe
>
Many Thanks in Advance,
C R Baradwaj -
After installing Data Base cache Succesfully.
I invoked my appilcation and runned some reports and forms. But I could not see any Hits/misses in the Cache manager statistics.
But if I am executing it in Back end at SQL Prompt, those are visible in Hit/Misses statistics.
1) How can I make my application to use Database Cache?
2) Also I want to Know if my application is using Web Cache or not. Is there any way to Check this out.
Pls. help me. I am running out of time
Gopi Kumar
nullThanks for your reply. Infact I saw your question before I posted my question. Actually that answer will not suffice for me.
I invoked my application and ran some reports. Since report contains SQL statements, The Hit/Misses statistics has to show whether that particular SQL is a Hit or Miss. But, its not showing anything, But if I run the SQL at Backend it's showing in the Statistics.
Now I dont know how to make my application to use database cache.
Any more clues.....
Gopi Kumar
null
Maybe you are looking for
-
Help with Factorial Calculations
Hi, I've got the following sample code for getting the Factorial of a number. It works fine for small numbers but I need it to handle larger ones (eg 365! ). Any suggestions for how to get it to work : public class Fac public static void main(String[
-
How do I find photos in hidden folders?
I am trying to find photos where the automatically download. The folder seems to be hidden. How can I find it?
-
How to Connect to multiple oracle databse
Dear All As I am new to Java Can you post java code for how to connect mutliple database (I am using Oracle database) with one class or method and the Connection con object I want use in my jsp to get connected and obtain result for response. Can you
-
Hi, I'm writing a java app which is connected to a ms access db. I have the following query, but i get a run time error that states "too few parameters expected 1". I think the problem lies with the DateDiff part of the query, i want it to calculate
-
Software Update- Now impossible to restore?
I just updated the software on my iPone 4 and then it told me I needed to restore my phone so I clicked "Restore" then my options were "Update & Restore" or "Cancel". I tried the "Update & Restore" it it began to download the software again then tell