Friday, October 9, 2015

optimizer_index_cost_adj hint

Sometimes you want to use alter session set optimizer_index_cost_adj=<value> to change the parameter, but you can also use hint for the purpose, for example:
select /*+ opt_param('optimizer_index_cost_adj',20) */ col1, col2 . .
And optimizer_mode hint:
select /*+ opt_param('optimizer_mode','first_rows_10') */ col1, col2 . . .  

Monday, September 28, 2015

Session hang because 'gc cr request' and 'cr request retry'

In 11g Rac, during datapump import, session hangs at step of importing indexes or constraints.

If you check v$session_wait for the sid, you may notice  'gc cr request' and 'cr request retry':

SQL> select event from v$session_wait where sid=405;

gc cr request

SQL> select event from v$session_wait where sid=405;

cr request retry

Mostly it's caused by Redo log IO performance or the interconnect performance.

You can try:
1) Improve the interconnect performance.
2) Improve the Redo log I/o performance.
3) Set undersore parameter "_cr_server_log_flush" =false.

Monday, June 15, 2015

SqlDeveloper 4.0 or later freezes

Starting from version 4.0, you may notice SqlDeveloper "freezes" quite regularly; it simply does nothing and does not accept keyboard input or mouse clicks. It remains in that state for 20 or 30 seconds, then continues to work normally. No error message or log entry.

It seems to be a java bug. Updating NVIDIA video driver can improve the performance. The recommended workaround from the Java Bug DB -- set this property by adding a line in sqldeveloper.conf:

AddVMOption -Dsun.awt.nopixfmt=true

Monday, April 13, 2015

windows process perl.exe Consumes High CPU

  • The Database Control (DB Control) Consumes High CPU - BEGIN EMD_NOTIFICATION.QUEUE_READY (Doc ID 734536.1)
  • Grid Control Agent Consumes High CPU when Executing / Log File Monitoring Metric (Doc ID 757877.1)

Friday, March 13, 2015

Aix get last day of current month

cal | awk '($0 != "") {F=$NF} END {print F}'
cal |grep .|fmt -1|tail -1

You can also find out the last day of any month by providing month and year to cal. for example:
cal 2 2012|awk '($0 != "") {F=$NF} END {print F}'
cal 10 2011|awk '($0 != "") {F=$NF} END {print F}'