Alternative to cursor_sharing parameter
Hello,
We presently have a 3rd party application that has an Oracle 9.2.0.8 db with statistics run on it and would like to improve performance with some bind variable queries in setting the cursor_sharing = force.
The problem is that when certain queries return a larger character set string, the apps does not accept and errors out.
Does anyone have any experience with this parameter and it's alternatives?
Much appreciated.
JR
Hi JR,
would like to improve performance with some bind variable queries in Cursor_sharing is a Godsend for shops with vendor SQL that cannot be changed, and for shops with ad-hoc query where literals appear in the SQL.
Does anyone have any experience with this parameter and it's alternatives?Before cursor_sharing, we made the shared_pool very tiny.
Since there was no reason to cached non-reentrant SQL, why even have a shared pool?
Obviously, the best remedy is to re-write your code to use host variables, but that's rarely a practical solution!
Also note that cursor_sharing=similar now works in 11g . . .
I have some notes here that you may find helpdul:
http://www.dba-oracle.com/t_cursor_sharing.htm
Hope this helps . . .
Donald K. Burleson
Oracle Press author
Author of "Oracle Tuning: The Definitive Reference"
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
Similar Messages
-
To solve ORA-1008,set cursor_sharing parameter to EXACT
Per Bug 7154579 customer, to solve ORA-1008,set cursor_sharing parameter to EXACT but still see the error on the application.
One of the instance in our 4 node RAC USED to have cursor_sharing=similar, and the rest set to exact. Customer changed it to 'exact' longtime back. but still found some background process using cursor_sharing=similar ( and still see the error 1008) .
After the bounce of the above-mentioned node, but absent a clean restart of the whole RAC database, the customer still experienced the 1008 error. Session level is showing,INSTEAD OF "SIMILAR" for the background processes,the entries of "uninitialized". See query below:
SYS@ptmpnew4 >select inst_id,id,name,value from gV$SYS_OPTIMIZER_ENV where name like 'cursor%' ;
INST_ID ID NAME VALUE
4 48 cursor_sharing exact
3 48 cursor_sharing exact
2 48 cursor_sharing exact
1 48 cursor_sharing exact
SYS@ptmpnew4 >
SYS@ptmpnew4 >select inst_id,name,value,count(1) from gV$ses_OPTIMIZER_ENV where name like 'cursor%'
group by inst_id,name,value; 2
INST_ID NAME VALUE COUNT(1)
1 cursor_sharing exact 599
1 cursor_sharing uninit 20
2 cursor_sharing exact 590
2 cursor_sharing uninit 18
3 cursor_sharing exact 583
3 cursor_sharing uninit 19
4 cursor_sharing exact 600
4 cursor_sharing uninit 18
what could be the possible reasoncursor_sharing parameter in the init. ora allows you to change the shared pool's default behaviour when parsing and caching SQL statements.
force - allows two SQL statements, which differ only by a literal value, to share parsed code cached in the shared pool. the difference in literal values must not change the meaning of the statement.
similar - allows two sql statements, which differ only by a literal value, to share parsed code cached in the shared pool. the difference in literal values must not change the meaning of the statement or its cached execution plan.
exact - two sql statements must match exactly in order to share the parse code cached in shared pool.
refer the link given below , you will get answer for all your questions.
http://www.oracle.com/technology/oramag/oracle/06-jan/o16asktom.html
to know Parsing in Oracle, refer.
http://www.databasejournal.com/features/oracle/article.php/3341851/Parsing-in-Oracle.htm
Edited by: rajeysh on Jun 19, 2010 12:40 PM -
Alternatives to long parameter lists when calling methods
I've heard you shouldn't have more than 3 parameters when calling methods. What are the alternatives to long parameter lists when calling methods? Compounding parameters into new inner classes, declaring them as member fields? Which one is preferable?
Okay, I get it. But since it's late in the day, I'll share my additional wandering thoughts. And I'll just go ahead and preemptively slap myself for doing so. Ouch! There. So the rules are more like this:
1) Only use setters if the values in question are meant to be part of the state of an object.
2) In general, don't let external entities directly set the state of an object.
Which can be combined into:
1) In general, never use setters.
Which could be reworded to:
1) Only use setters in non-general situations.
Or:
1) Only use setters when setters are a good solution...which isn't very often...generally speaking...
Or if I were to infer when it's a good solution:
1) Only use a setter when it is useful to the caller and has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class...generally speaking...
Actually, you might just infer from here forward that the "generally speaking" is implicit to every rule, and is essentially the "There is an exception to every rule" rule. Which is an interesting rule because it can be applied to itself, resulting in a paradox...generally speaking...but I digress.
And then translated back to the original topic:
1) You can use a setter instead of a constructor argument so long as the value isn't needed at time of construction (or a default value will suffice) and it is useful for the caller to be able to use the setter and using the setter has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class.
But this won't quite cut it either. With the input of others, we could eventually devise a very concise rule, but it will end up being so long that on one will ever read it...making it an ideal candidate to be included in a legal document. Which will eventually find it's way into a very long scroll pane with a check box at the end exclaiming that you read the document, at which you will not be able to continue unless you check the check box...at which point, what do you do? After all, you are not a liar...generally speaking...
In summary, you could potentially use setters in some limited cases, but in the general sense, that's more of an option than a recommendation. :-) -
Alternative for "Commode" parameter in Host command
Dear Buddies
As we use "Commode" parameter to run report (using Run Product built-in), so can we use it in "Host ifrun60" command too to run our reports in "Asynchronous" communication mode?? I've tried this in my Host command like this
.....commode=asynchronous....
Or is there any alternative for this parameter to use in Host command?Host built in is used to invoke any executable from forms. It can be used to invoke calc , word or any exe
I dont think its a good idea to use host built since you will not get the status.
Use run_product or run_report_object
Rajesh ALex -
Cursor_Sharing parameter
Hi All,
On one of our db the CURSOR_SHARING parameter is set to SIMILAR (non default value) coz I think the developers are not using the Bind variables in their queries, so literals will be replaced with bind variables as this parameter is set.
I remember this parameter can also be set to FORCE to do the same. So what is the exact difference between these two.
Please clarify me on the same.
Thanks in Advanced
- BhupinderWhen using FORCE, the literals are exchanged with bind variables whenever the meaning (sematnics) of the SQL will not be changed by the bind variables.
When using SIMILAR, literals will be replaced by bind variables whenever the meaning and the optimizer plan will not be chnaged by the bind variables.
So this means that when using FORCE, by using the bind variable the optimzier plan can be changed for example:
select * from big_table where id = 12345
if there is a index on the column ID and the percent of rows having ID = 12345 is small index will be used (the table is analyzed).
but if Oracle replaces 12345 by :b1 the optimzier will not know what is the percebnt od rows with that ID until run time, sothe execution plan might be changed and full table scan can be done. If using cursor_sharing = SIMILAR Oracle in this case will not change the literal with bind variable.
Gorjan Todorovski
Oracle DBA
MOBIMAK -
Cursor_sharing parameter in Force or Similar
Hi ALL,
OS:AIX
DB:11gR2
We are facing performance issues in one of our database and after investigation ADDM is suggesting that there is a lot of Hard parsing happening at the datbase level and there is a undersized SGA, We have taken care of the Shared Pool size but we for Cursor_sharing we are in a predicament. Currently it is being set to similar and earlier it was set to force but still no affect of these paremeter. These settings were suggested by Oracle Support Team.
I have also read that from 11gr2, cursor_sharing=similar has deprecated but still Oracle team sugested this setting. I more inclined to setting it to Force but I am not sure as I have also read that FORCE should be avoided as this affects the execution plan and hence similar is a more recommede method. I need to know how does it affects the execution plan per say.
Regards,
SphinxFor this type of query, http://asktom.oracle.com has always been an excellent resource.
Here is your link
Ask Tom "cursor sharing exact VS force in 11g"
I recommend you always try to use it.
Sybrand Bakker
Senior Oracle DBA -
CURSOR_SHARING universe parameter
Does anyone know if the CURSOR_SHARING parameter is supported in a universe (BOXI R2 SP3, FP3.3)? BOXI R2 is running on AIX, and the reporting and CMS databases are on Oracle 10g. On the database side, CURSOR_SHARING is set to FORCE. On the universe side, we want to set the CURSOR_SHARING value to EXACT. Is this possible?
The solution to this is to add the following value to the ConnectInit parameter in the Universe Connection, "alter session set cursor_sharing=exact". Don't use the double quotes in your value.
-
How to check query is getting reused after changing parametr cursor_sharing
Hello,
Oracle Version: 11g
OS Version: Windows 2003 64Bit
How to find if a particular query is getting reused after change in a cursor_sharing parameter from EXACT to SIMILAR.
Which set of Views/DD's should i query go get the relevant details.
Thanks in advance.
-Vijay.SQL> desc v$sqlarea
Name Null? Type
SQL_TEXT VARCHAR2(1000)
SQL_FULLTEXT CLOB
SQL_ID VARCHAR2(13)
SHARABLE_MEM NUMBER
PERSISTENT_MEM NUMBER
RUNTIME_MEM NUMBER
SORTS NUMBER
VERSION_COUNT NUMBER
LOADED_VERSIONS NUMBER
OPEN_VERSIONS NUMBER
USERS_OPENING NUMBER
FETCHES NUMBER
EXECUTIONS NUMBER
PX_SERVERS_EXECUTIONS NUMBER
END_OF_FETCH_COUNT NUMBER
USERS_EXECUTING NUMBER
LOADS NUMBER
FIRST_LOAD_TIME VARCHAR2(19)
INVALIDATIONS NUMBER
PARSE_CALLS NUMBER
DISK_READS NUMBER
DIRECT_WRITES NUMBER
BUFFER_GETS NUMBER
APPLICATION_WAIT_TIME NUMBER
CONCURRENCY_WAIT_TIME NUMBER
CLUSTER_WAIT_TIME NUMBER
USER_IO_WAIT_TIME NUMBER
PLSQL_EXEC_TIME NUMBER
JAVA_EXEC_TIME NUMBER
ROWS_PROCESSED NUMBER
COMMAND_TYPE NUMBER
OPTIMIZER_MODE VARCHAR2(10)
OPTIMIZER_COST NUMBER
OPTIMIZER_ENV RAW(797)
OPTIMIZER_ENV_HASH_VALUE NUMBER
PARSING_USER_ID NUMBER
PARSING_SCHEMA_ID NUMBER
PARSING_SCHEMA_NAME VARCHAR2(30)
KEPT_VERSIONS NUMBER
ADDRESS RAW(4)
HASH_VALUE NUMBER
OLD_HASH_VALUE NUMBER
PLAN_HASH_VALUE NUMBER
MODULE VARCHAR2(64)
MODULE_HASH NUMBER
ACTION VARCHAR2(64)
ACTION_HASH NUMBER
SERIALIZABLE_ABORTS NUMBER
OUTLINE_CATEGORY VARCHAR2(64)
CPU_TIME NUMBER
ELAPSED_TIME NUMBER
OUTLINE_SID VARCHAR2(40)
LAST_ACTIVE_CHILD_ADDRESS RAW(4)
REMOTE VARCHAR2(1)
OBJECT_STATUS VARCHAR2(19)
LITERAL_HASH_VALUE NUMBER
LAST_LOAD_TIME DATE
IS_OBSOLETE VARCHAR2(1)
CHILD_LATCH NUMBER
SQL_PROFILE VARCHAR2(64)
PROGRAM_ID NUMBER
PROGRAM_LINE# NUMBER
EXACT_MATCHING_SIGNATURE NUMBER
FORCE_MATCHING_SIGNATURE NUMBER
LAST_ACTIVE_TIME DATE
BIND_DATA RAW(2000) -
Dedicated database & cursor_sharing
I have Oracle db 11gr2 on aix wich is running in dedicated mode.
Based on a application documentation, I put cursor_sharing parameter to EXACT.
but, I wonder... could it there be any cursor sharing if a db is in dedicated mode?PrafullaNath wrote:
Oracle says we should keep cursor_sharing=similar. Could you point out a documentation with this ?
EXACT is the default value:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10820/initparams041.htm#REFRN10025
Using any other value than the default one requires strong application testing since it has been caused a lot of troubles by the past (wrong results were returned).
Nicolas. -
Cursor_sharing=similar or cursor_sharing=exact
Hai,
I have doubt regarding setting cursor_sharing parameter exact and similar at session level.
On my database cursor_sharing is set similar at system level.
test >show parameter cursor
NAME TYPE VALUE
cursor_sharing string SIMILARI have fired a simple select statement without setting any cursor_sharing at session level
TEST >variable b1 number;
TEST >exec :b1:=7499;
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
TEST >select empno,job from emp where job='SALESMAN' and empno=:b1;
EMPNO JOB
7499 SALESMANchecking the hash value for query fired
test >select sql_text,invalidations,hash_value,executions,loads from v$sqlarea
16:14:50 2 where sql_text like '%select empno,job from%';
SQL_TEXT
INVALIDATIONS HASH_VALUE EXECUTIONS LOADS
select empno,job from emp where job=:"SYS_B_0" and empno=:b1
0 3727168047 1 1Literal job='SALESMAN' is converted into system generated bind variable job=:"SYS_B_0" as my cursor_sharing=similar
Fired the same statement by setting cursor_sharing=exact at session level
TEST >alter session set cursor_sharing=exact;
Session altered.
Elapsed: 00:00:00.00
16:15:25 TEST >select empno,job from emp where job='SALESMAN' and empno=:b1;Checking the hash value for newly fired query with cursor_sharing=exact
SQL_TEXT
INVALIDATIONS HASH_VALUE EXECUTIONS LOADS
select empno,job from emp where job='SALESMAN' and empno=:b1
0 2065003705 1 1
select empno,job from emp where job=:"SYS_B_0" and empno=:b1
0 3727168047 1 1literal job='SALESMAN' is not converted into bind variable as my cursor_sharing=exact
At the same session fired the same query by setting cursor_sharing=similar ..to check which hash value would be shared.
16:15:28 TEST >alter session set cursor_sharing=similar;
Session altered.
Elapsed: 00:00:04.09
17:27:54 TEST >select empno,job from emp where job='SALESMAN' and empno=:b1;
EMPNO JOB
7499 SALESMAN
16:28:26 test >select sql_text,invalidations,hash_value,executions,loads from v$sqlarea
17:28:13 2 where sql_text like '%select empno,job from%';
SQL_TEXT
INVALIDATIONS HASH_VALUE EXECUTIONS LOADS
select empno,job from emp where job='SALESMAN' and empno=:b1
0 2065003705 2 *2*
select empno,job from emp where job=:"SYS_B_0" and empno=:b1
0 3727168047 1 1The hash value 2065003705 (cursor_sharing=exact) is shared as executions column is changed from 1 to 2.
So after setting parameter cursor_sharing = similar why the hash value of 3727168047(cursor_sharing=similar)
is not shared?I guess something is cached at session level but i want to know the exact reason..
Again i flushed the shared pool
test >alter system flush shared_pool;
System altered.
Elapsed: 00:00:03.09
17:39:40 test >select sql_text,invalidations,hash_value,executions,loads from v$sqlarea
17:39:44 2 where sql_text like '%select empno,job from%';
SQL_TEXT
INVALIDATIONS HASH_VALUE EXECUTIONS LOADS
select empno,job from emp where job='SALESMAN' and empno=:b1
0 2065003705 0 2The hash value of 3727168047(cursor_sharing=similar) is removed ..not hash value 2065003705
What is the reason behind that ...
Regards,
MeeranMeeran wrote:
The hash value 2065003705 (cursor_sharing=exact) is shared as executions column is changed from 1 to 2.
So after setting parameter cursor_sharing = similar why the hash value of 3727168047(cursor_sharing=similar)
is not shared?I guess something is cached at session level but i want to know the exact reason..Because there is a query in the shared_pool with same literal value so it doesn't have to use the hash 3727168047 and substitute the bind where it already has a plan for the same statement which is 2065003705.
I think with setting CURSOR_SHARING=similar again, If you try the query with JOB='ANALYST' then it will use the plan 3727168047 and substitute the bind with 'ANALYST'.
Again i flushed the shared pool
test >alter system flush shared_pool;
System altered.
Elapsed: 00:00:03.09
17:39:40 test >select sql_text,invalidations,hash_value,executions,loads from v$sqlarea
17:39:44 2 where sql_text like '%select empno,job from%';
SQL_TEXT
INVALIDATIONS HASH_VALUE EXECUTIONS LOADS
select empno,job from emp where job='SALESMAN' and empno=:b1
0 2065003705 0 2The hash value of 3727168047(cursor_sharing=similar) is removed ..not hash value 2065003705
What is the reason behind that ...If you have noticed, the executions for the hash plan 2065003705 are 0 after the shared_pool flushing. It seems that with flush shared_pool, oracle doesn't flush the queries with literals and just reset their stats. As literals are always the culprits.
You may also wanna read this, as good document on CURSOR_SHARING. -
Index usage making SQL slower.
Hello,
While working on a performance tuning activity on Oracle 10.2.0.4 on Solaris 10, I encountered a problem wherein one of our DBA's suggested indexing 2 columns of a certain table. One of the queries which is being run on that table has a RULE hint, and it is seen to be making use of this newly created index. Before the index was created, this query was running fine and getting completed within 30 mins or so. However after the index is created, it is now taking 12 hours on average to complete. Please note that in both the above cases, the CURSOR_SHARING parameter was set to EXACT. Yes, after the index was created its statistics were computed, and for both the index and the base table statistics were gathered. The query is making use of bind variables and is being run via the SQR engine of PeopleSoft.
Please advice what can be the possible reasons for such delays being caused?
For any information, please let me know and I would provide the same in this forum/
Note for moderators: I could not find the section for Performance tuning, so I am asking this question in the general forum. Apologies.
Thank You,
Prashant.Index scans are not always faster.
Full table scans are not always bad.
I doubt that the RULE hint is necessary.
In general, [url http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.pdf]the CBO does an excellent job of finding the best access plan for a given sql provided it is able to accurately estimate the cardinalities of the row sources in the plan.
See advice and information required in the template tuning threads:
[url https://forums.oracle.com/forums/thread.jspa?threadID=863295]How to post a sql tuning request
[url https://forums.oracle.com/forums/thread.jspa?messageID=1812597]When your query takes too long -
Statpack analyzing of 9i database.
hi Expertise
Please help me for sorting the statpack report of my production DB in 9i. Also advise some recommendation after analyzing my statpack view.
Elapsed: 3.75 (min) 225 (sec)
DB Time: 7.84 (min) 470.65 (sec)
Cache: 10,016 MB
Block Size: 8,192 bytes
Transactions: 2.01 per second
Performance Summary
Physical Reads: 15,666/sec MB per second: 122.39 MB/sec
Physical Writes: 22/sec MB per second: 0.17 MB/sec
Single-block Reads: 1,412.69/sec Avg wait: 0.03 ms
Multi-block Reads: 1,916.26/sec Avg wait: 0.05 ms
Tablespace Reads: 3,346/sec Writes: 22/sec
Top 5 Events
Event Percentage of Total Timed Events
CPU time 79.89%
PX Deq: Execute Reply 6.38%
db file scattered read 4.32%
SQL*Net more data from dblink 4.29%
db file sequential read 2.00%
Tablespace I/O Stats
Tablespace Read/s Av Rd(ms) Blks/Rd Writes/s Read% % Total IO
TS_CCPS 3,117 0 2.5 0 100% 92.5%
TS_OTHERS 204 0.2 26.2 1 99% 6.09%
TS_AC_POSTED03 19 1.9 127 2 89% 0.63%
Load Profile
Logical reads: 42,976/s Parses: 39.41/s
Physical reads: 15,666/s Hard parses: 5.43/s
Physical writes: 22/s Transactions: 2.01/s
Rollback per transaction: 0% Buffer Nowait: 100%
4 Recommendations:
Your database has relatively high logical I/O at 42,976 reads per second. Logical Reads includes data block reads from both memory and disk. High LIO is sometimes associated with high CPU activity. CPU bottlenecks occur when the CPU run queue exceeds the number of CPUs on the database server, and this can be seen by looking at the "r" column in the vmstat UNIX/Linux utility or within the Windows performance manager. Consider tuning your application to reduce unnecessary data buffer touches (SQL Tuning or PL/SQL bulking), using faster CPUs or adding more CPUs to your system.
You are performing more than 15,666 disk reads per second. High disk latency can be caused by too-few physical disk spindles. Compare your read times across multiple datafiles to see which datafiles are slower than others. Disk read times may be improved if contention is reduced on the datafile, even though read times may be high due to the file residing on a slow disk. You should identify whether the SQL accessing the file can be tuned, as well as the underlying characteristics of the hardware devices.
Check your average disk read speed later in this report and ensure that it is under 7ms. Assuming that the SQL is optimized, the only remaining solutions are the addition of RAM for the data buffers or a switch to solid state disks. Give careful consideration these tablespaces with high read I/O: TS_CCPS, TS_OTHERS, TS_AC_POSTED03, TS_RATING, TS_GP.
You have more than 1,222 unique SQL statements entering your shared pool, with the resulting overhead of continuous RAM allocation and freeing within the shared pool. A hard parse is expensive because each incoming SQL statement must be re-loaded into the shared pool; with the associated overhead involved in shared pool RAM allocation and memory management. Once loaded, the SQL must then be completely re-checked for syntax & semantics and an executable generated. Excessive hard parsing can occur when your shared_pool_size is too small (and reentrant SQL is paged out) or when you have non-reusable SQL statements without host variables. See the cursor_sharing parameter for an easy way to make SQL reentrant and remember that you should always use host variables in you SQL so that they can be reentrant.
Instance Efficiency
Buffer Hit: 69.13% In-memory Sort: 100%
Library Hit: 96.4% Latch Hit: 99.99%
Memory Usage: 95.04% Memory for SQL: 64.19%
2 Recommendations:
Your Buffer Hit ratio is 69.13%. The buffer hit ratio measures the probability that a data block will be in the buffer cache upon a re-read of the data block. If your database has a large number of frequently referenced table rows (a large working set), then investigate increasing your db_cache_size. For specific recommendations, see the output from the data buffer cache advisory utility (using the v$db_cache_advice utility). Also, a low buffer hit ratio is normal for applications that do not frequently re-read the same data blocks. Moving to SSD will alleviate the need for a large data buffer cache.
Your shared pool maybe filled with non-reusable SQL with 95.04% memory usage. The Oracle shared poolcontains Oracle´s library cache, which is responsible for collecting, parsing, interpreting, and executing all of the SQL statements that go against the Oracle database. You can check the dba_hist_librarycache table in Oracle10g to see your historical library cache RAM usage.
SQL Statistics
Click here to see all SQL data
Wait Events
Event Waits Wait Time (s) Avg Wait (ms) Waits/txn
PX Deq: Execute Reply 137 30 219 0.3
db file scattered read 431,159 20 0 951.8
SQL*Net more data from dblin 51,140 20 0 112.9
db file sequential read 317,856 9 0 701.7
io done 6,842 5 1 15.1
db file parallel read 21 1 52 0.0
local write wait 250 1 4 0.6
db file parallel write 825 1 1 1.8
SQL*Net message from dblink 208 1 3 0.5
log file parallel write 2,854 1 0 6.3
0 Recommendations:
Instance Activity Stats
Statistic Total per Second per Trans
SQL*Net roundtrips to/from client 87,889 390.6 194.0
consistent gets 10,141,287 45,072.4 22,387.0
consistent gets - examination 884,579 3,931.5 1,952.7
db block changes 100,342 446.0 221.5
execute count 18,913 84.1 41.8
parse count (hard) 1,222 5.4 2.7
parse count (total) 8,868 39.4 19.6
physical reads 3,525,003 15,666.7 7,781.5
physical reads direct 539,879 2,399.5 1,191.8
physical writes 5,132 22.8 11.3
physical writes direct 29 0.1 0.1
redo writes 1,598 7.1 3.5
session cursor cache hits 4,378 19.5 9.7
sorts (disk) 0 0.0 0.0
sorts (memory) 4,988 22.2 11.0
table fetch continued row 310 1.4 0.7
table scans (long tables) 82 0.4 0.2
table scans (short tables) 18,369 81.6 40.6
workarea executions - onepass 0 0.0 0.0
5 Recommendations:
You have high network activity with 390.6 SQL*Net roundtrips to/from client per second, which is a high amount of traffic. Review your application to reduce the number of calls to Oracle by encapsulating data requests into larger pieces (i.e. make a single SQL request to populate all online screen items). In addition, check your application to see if it might benefit from bulk collection by using PL/SQL "forall" or "bulk collect" operators.
You have 3,931.5 consistent gets examination per second. "Consistent gets - examination" is different than regular consistent gets. It is used to read undo blocks for consistent read purposes, but also for the first part of an index read and hash cluster I/O. To reduce logical I/O, you may consider moving your indexes to a large blocksize tablespace. Because index splitting and spawning are controlled at the block level, a larger blocksize will result in a flatter index tree structure.
You have high update activity with 446.0 db block changes per second. The DB block changes are a rough indication of total database work. This statistic indicates (on a per-transaction level) the rate at which buffers are being dirtied and you may want to optimize your database writer (DBWR) process. You can determine which sessions and SQL statements have the highest db block changes by querying the v$session and v$sessatst views.
You have high disk reads with 15,666.7 per second. Reduce disk reads by increasing your data buffer size or speed up your disk read speed by moving to SSD storage. You can monitor your physical disk reads by hour of the day using AWR to see when the database has the highest disk activity.
You have high small table full-table scans, at 81.6 per second. Verify that your KEEP pool is sized properly to cache frequently referenced tables and indexes. Moving frequently-referenced tables and indexes to SSD or theWriteAccelerator will significantly increase the speed of small-table full-table scans.
Buffer Pool Advisory
Current: 3,599,469,418 disk reads
Optimized: 1,207,668,233 disk reads
Improvement: 66.45% fewer
The Oracle buffer cache advisory utility indicates 3,599,469,418 disk reads during the sample interval. Oracle estimates that doubling the data buffer size (by increasing db_cache_size) will reduce disk reads to 1,207,668,233, a 66.45% decrease.
Init.ora Parameters
Parameter Value
cursor_sharing similar
db_block_size 8,192
db_cache_size 8GB
db_file_multiblock_read_count 32
db_keep_cache_size 1GB
hash_join_enabled true
log_archive_start true
optimizer_index_caching 90
optimizer_index_cost_adj 25
parallel_automatic_tuning false
pga_aggregate_target 2GB
query_rewrite_enabled true
session_cached_cursors 300
shared_pool_size 2.5GB
optimizercost_model choose
1 Recommendations:
You are not using large blocksizes for your index tablespaces. Oracle research proves that indexes will build flatter tree structures in larger blocksizes.Systemwide Tuning using STATSPACK Reports [ID 228913.1] and http://jonathanlewis.wordpress.com/statspack-examples/ should be useful.
-
HI experts can any body explain following
In item category there are fields under BOM. could you pls explain what is the meaning
1.Manual alternative
2. Parameter effectiveness
While creating BOM we check create dly group in TAP but not in TAQ, and in TAN we check parameter effectiveness, and why do we check Credit active field for TAP and TAE any these item categories are for free items why should we check credit for freet goods or dependant materials. i didnt understood logic. can any body explain.
Regards
kRISHE1. Manual alternatives is used in BOM configuration, when the BOM proposed by the system can eb overwritten by soem other BOM. In this case, the checkbox should be switched on. There should also be alternative BOM maintenance for the main BOM for the material.Only then, teh functionality becomes fully active.
2. Parameter effectivity is a way of making somethign valid based on what is called parameters in SAP. You can define any field, or any value as a parameter and you can define that some transaction is valid only if the parameter value in that transaction is available. Unfortunately, I dont have any live example for this case where I have worked on. May be if you do some google search, you should be able to dig more into this. -
Unzip zipfile with nonenglish filenames
hi, all
i tried to use apache foundation alternative (supports
encoding
parameter to resolve filenames encoding) to standard
unzipping classes
located in JVM 1.4.x. classes are located in package
org.apache.tools.zip.* in ant.jar
everything works fine in tomcat, but in JRun/CF7 following
message is
displayed ...
as you can guess cf also uses ant.jar, and that is probably
the problem.
thanks for advice,
jan
tried to access field
org.apache.tools.zip.ZipOutputStream.EOCD_SIG from
class org.apache.tools.zip.ZipFile
java.lang.IllegalAccessError: tried to access field
org.apache.tools.zip.ZipOutputStream.EOCD_SIG from class
org.apache.tools.zip.ZipFile
at
org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:348)
at
org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:243)
at org.apache.tools.zip.ZipFile.(ZipFile.java:142)
at cz.sitewell.zip.Zipping.decompress(Zipping.java:66)
at cz.sitewell.zip.Zipping.decompress(Zipping.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at coldfusion.runtime.StructBean.invoke(StructBean.java:388)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1655)
at
cftestik2ecfm365833867.runPage(C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\testik.cf m:18)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)
at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)
at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at
jrunx.util.DynamicClassLoaderFilter.doFilter(DynamicClassLoaderFilter.java:48)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
at
jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)hello,
i found the problem but not solution yet ...
in jrun.jar is located some ancient (4years old) version of
ant
without ZipFile class. That class is loaded from newer
version of ant.jar.
protected fields probably work only on same jars, not
packages.
because of this IllegalAccessError is throwed.
is there some elegant solution to load newer version of ant?
of course
i see some workarounds such as modification of jrun.jar or
package
renaming to solve this ...
jan
Jan Gregor wrote:
> hi, all
>
> i tried to use apache foundation alternative (supports
encoding
> parameter to resolve filenames encoding) to standard
unzipping classes
> located in JVM 1.4.x. classes are located in package
> org.apache.tools.zip.* in ant.jar
>
> everything works fine in tomcat, but in JRun/CF7
following message is
> displayed ...
>
> as you can guess cf also uses ant.jar, and that is
probably the problem.
>
>
> thanks for advice,
> jan
>
>
>
> tried to access field
org.apache.tools.zip.ZipOutputStream.EOCD_SIG from
> class org.apache.tools.zip.ZipFile
>
>
> java.lang.IllegalAccessError: tried to access field
> org.apache.tools.zip.ZipOutputStream.EOCD_SIG from class
> org.apache.tools.zip.ZipFile
> at
>
org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:348)
> at
>
org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:243)
> at org.apache.tools.zip.ZipFile.(ZipFile.java:142)
> at cz.sitewell.zip.Zipping.decompress(Zipping.java:66)
> at cz.sitewell.zip.Zipping.decompress(Zipping.java:54)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
coldfusion.runtime.StructBean.invoke(StructBean.java:388)
> at
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1655)
> at
>
cftestik2ecfm365833867.runPage(C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\testik.cf m:18)
>
> at
coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
> at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)
> at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
> at
>
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)
> at
coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
> at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
> at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)
> at
>
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
>
> at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
> at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
> at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
> at coldfusion.CfmServlet.service(CfmServlet.java:105)
> at
>
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
> at
jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
> at
>
jrunx.util.DynamicClassLoaderFilter.doFilter(DynamicClassLoaderFilter.java:48)
>
> at
jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
> at
jrun.servlet.FilterChain.service(FilterChain.java:101)
> at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
> at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
> at
>
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
> at
>
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
> at
jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
> at
>
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
>
> at
jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) -
Please reply:how to avoid extra trailing spaces while using cursor sharing
i am using cursor sharing with FORCE or SIMILAR.
what is the solution to avoid extra trailing spaces without any java code change.
do we have any option in oracle to avoid extra trailing spaces during the query processing ?
I am using Oracle 10g
CURSOR SHARING is a feature in which multiple sql statements
which are same will have a shared cursor (in the library cache) for an oracle session,
i.e, the first three steps of the sql processing (hard parse, soft parse, optimization)
will be done only the first time that kind of statement is executed.
There are two ways in which similar SQL statements with different condition values can be made to "SHARE" cursor during execution:
1. Writing SQLs with Bind Variables: SQLs having no hard coded literals in them
For e.g., the query below
SELECT node.emp_name AS configid
FROM emp node
WHERE emp_no = :1
AND dept_no =
DECODE (SUBSTR (:2, 1, 3),
:3, :4,
(SELECT MAX (dept_no)
FROM emp
WHERE emp_no = :5 AND dept_no <= :6)
AND node.dept_type = :7
ORDER BY node.emp_name
Here all the variables are dynamically bound during the execution. The ":X" represents BIND Variable and the actual values are bound to the SQL only at the 4th step of the execution of the SQL.
In applications: The queries written with "?" as bind variables will be converted into ":X" and are sqls with Bind Variables.
2. The CURSOR_SHARING parameter: Only Useful for SQL statements containing literals:
For eg., the query below:
SELECT node.emp_name AS configid
FROM emp node
WHERE emp_no = 'H200'
AND dept_no =
DECODE (SUBSTR (:1, 1, 3),
'PLN', :2,
(SELECT MAX (dept_no)
FROM emp
WHERE emp_no = :3 AND dept_no <= :4)
AND node.dept_type = :5
ORDER BY node.emp_name
In the query above, there are two hard coded literals H200 , PLN. In this case when the same SQL executed with different values like (H2003 , PLN), oracle will create a new cursor for this statement and all the first three steps ( hard & soft parse and optimization plan) needs to be done again.
This can be avoided by changing the CURSOR_SHARING parameter which can be set to any of three values:
1. EXACT: Causes the mechanism not be used, i.e. no cursor sharing for statements with different literals. This is the default value.
2. FORCE: Causes unconditional sharing of SQL statements that only differ in literals.
3. SIMILAR: Causes cursor sharing to take place when this is known not to have any impact on optimization.
So, FORCE and SIMILAR values of the parameter will be helping in cursor sharing and improve the performance of the SQLs having literals.
But here the problem arises if we use the FORCE and SIMILAR other than EXACT.
alter session set cursor_sharing ='EXACT'
select 1 from dual;
'1'
1
alter session set curson_sharing='FORCE'
select 2 from dual;
'2'
2
alter session set curson_sharing='SIMILAR'
select 3 from dual;
'3'
3
So, this will give extra trailing spaces in when we retrieve from java method and any
further java processing based on the hardcoded literal values will fail. this needs lot of
effort in remodifying the existing millions of lines of code.
My question is i have to use cursor sharing with FORCE or SIMILAR and can't we do the trimming
from the oracle query processing level ?
please help me on this ?
Message was edited by:
Leeladhar
Message was edited by:
LeeladharPlease reply to this thread
How to avoid extr trailing spaces using Cursor sharing opton FORCE, SIMILAR
Maybe you are looking for
-
Since changing over to Mountain Lion I discover that I am no longer able to adjust spaces between lines. If I choose spacing of 1.3 after two lines single-spaced, the entire previous lines end up with 1.3 spacing. What am I missing?
-
Cannot perform Bean lookup on signed Applet jar
Hi All, I'm after developing an applet which runs from a number of jars on an Orion app server. Each one of these jars are signed and I can access the Applet okay. The problem is that I make remote reference to EJB's throughout the application. I can
-
3 DVI monitors with Thunderbolt Mac Mini
Is it possible to have 3 DVI monitors with Thunderbolt Mac Mini?
-
Anyone order from Store 483 in Queens NY
Has anyone pre-ordered from the best buy in queens center? I am wondering if they got in and how many
-
While I'm trying to figure out why db_writer_process=2 hangs (see my other thread), I've been using dbwr_io_slaves=4, but my checkpoint times are horrible! My redos are sized at 250MB. As an experiment I batch inserted 160MB from one table to another