30EA1: SQL History performance

when I press F8 to show sql history, the application performance become very slow,
happen to you?

Previously I thought it was just the SQL history window that was slow, but it turns out to be the whole app.
I found that doing a simple select returning 16 rows took ~2 seconds with SQL history off and ~7 seconds with it turned on.

Similar Messages

  • 30EA1 SQL History spikes cpu and hangs, un-usable

    app works fine until I open the sql history (F8) , cpu spikes and stays above 50% until I close history window. As soon as I close it, the app is responsive again.
    I have less than 1000 entries in the sql history window.
    Has anyone else experienced this?

    There have been performance issues associated with having the SQL History pane open (30EA1: SQL History performance so if you have that open, you could try with it closed. Maybe that is bug 10233068 that gggraham referred to, but I couldn't find another reference to that bug on the forum and it is not a published bug.

  • 30EA1: New SQL History?

    Hi,
    The SQL History from previous versions is not retained, but luckily not physically deleted either. It seems 3.0 has a new system? (If so, please remember to include it in the migration process before release!)
    Thanks,
    K.

    In my case I can see what looks like migrated SQL History (based on dates and content) but none of the new SQL statements are being shown. I could live without the migrated statements if I could get new statements to show up.

  • 30EA2: Hangs on opening SQL History

    Hi,
    After EA1's pretty strong performance impact regarding SQL History, I was hoping for improvement in EA2.
    However, after installing, migrating from 2.1.1, and setting preferences, I connected and selected the SQL History entry from the Edit menu. Then sqldev just hung with 50% CPU use (distributed over both cores), and never came back. After almost an hour I just killed it.
    Right now I'm trying again; I just ran sqldev, and selected the SQL History entry from the Edit menu.
    What's happening? Here's a dump if it helps:
    Full thread dump Java HotSpot(TM) Client VM (14.2-b01 mixed mode):
    "Checkpointer" daemon prio=6 tid=0x06ee8c00 nid=0x16a0 in Object.wait() [0x0ea8f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at com.sleepycat.je.utilint.DaemonThread.run(DaemonThread.java:152)
            - locked <0x15bc0f80> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "INCompressor" daemon prio=6 tid=0x06deb400 nid=0xa3c in Object.wait() [0x0e98f000]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at com.sleepycat.je.utilint.DaemonThread.run(DaemonThread.java:154)
            - locked <0x15bc1070> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "pool-4-thread-1" prio=6 tid=0x06697400 nid=0x17a0 waiting on condition [0x0e88f000]
       java.lang.Thread.State: TIMED_WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x1584df78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
            at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
            at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:583)
            at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:576)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    "Timer queue for AWT thread" daemon prio=6 tid=0x06e8cc00 nid=0xd30 in Object.wait() [0x0614f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1510a580> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "Timer queue for AWT thread" daemon prio=6 tid=0x0687d400 nid=0x11fc in Object.wait() [0x05a4f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1510a628> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "Timer queue for AWT thread" daemon prio=6 tid=0x0668d800 nid=0x1418 in Object.wait() [0x0560f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1510a6d0> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "IconOverlayTracker Timer" prio=6 tid=0x06ab4000 nid=0xe3c in Object.wait() [0x0773f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x14388ca8> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "Timer queue for AWT thread" daemon prio=6 tid=0x06a3f400 nid=0x1464 in Object.wait() [0x0634f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at ice.util.awt.TimedAWTExecutor.nextElem(TimedAWTExecutor.java:108)
            - locked <0x1424e478> (a java.lang.Object)
            at ice.util.awt.TimedAWTExecutor.runScheduler(TimedAWTExecutor.java:130)
            at ice.util.awt.TimedAWTExecutor$1.run(TimedAWTExecutor.java:19)
    "WaitCursor-Timer" prio=6 tid=0x069dd400 nid=0x171c in Object.wait() [0x0604f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x14226650> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "BaseTreeExplorer.NodeOpeningExecutor" prio=6 tid=0x068ef800 nid=0x1354 waiting on condition [0x05e4f000]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x13d92780> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
            at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    "pool-2-thread-1" prio=6 tid=0x068f4c00 nid=0x11d0 waiting on condition [0x05d4f000]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x13dbd6b8> (a java.util.concurrent.SynchronousQueue$TransferStack)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
            at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:422)
            at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:323)
            at java.util.concurrent.SynchronousQueue.take(SynchronousQueue.java:857)
            at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:947)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
            at java.lang.Thread.run(Thread.java:619)
    "Scheduler" daemon prio=6 tid=0x06944000 nid=0x378 in Object.wait() [0x05c4f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at oracle.dbtools.raptor.backgroundTask.TaskLinkedList.takeNextTask(TaskLinkedList.java:47)
            - locked <0x13d929b0> (a oracle.dbtools.raptor.backgroundTask.TaskLinkedList)
            at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$SchedulerThread.run(RaptorTaskManager.java:429)
    "Thread-6" daemon prio=6 tid=0x068cfc00 nid=0x15a4 in Object.wait() [0x05b4f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x13d11a80> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
            - locked <0x13d11a80> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            at org.tmatesoft.svn.core.javahl.SVNClientImplTracker.run(SVNClientImplTracker.java:65)
            at java.lang.Thread.run(Thread.java:619)
    "ChangeSetService" prio=2 tid=0x06939800 nid=0x10e8 in Object.wait() [0x0594f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            - waiting on <0x138a3b68> (a oracle.jdevimpl.vcs.changeset.ChangeSetService)
            at java.lang.Object.wait(Object.java:485)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService.awaitEvents(ChangeSetService.java:178)
            - locked <0x138a3b68> (a oracle.jdevimpl.vcs.changeset.ChangeSetService)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService.eventLoop(ChangeSetService.java:199)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService.access$200(ChangeSetService.java:56)
            at oracle.jdevimpl.vcs.changeset.ChangeSetService$2.run(ChangeSetService.java:138)
            at java.lang.Thread.run(Thread.java:619)
    "TimerQueue" daemon prio=6 tid=0x04be3000 nid=0xb34 in Object.wait() [0x0405f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at javax.swing.TimerQueue.run(TimerQueue.java:236)
            - locked <0x13510120> (a javax.swing.TimerQueue)
            at java.lang.Thread.run(Thread.java:619)
    "TimedCache-Timer" daemon prio=6 tid=0x03bb0000 nid=0x12f4 in Object.wait() [0x0476f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.util.TimerThread.mainLoop(Timer.java:483)
            - locked <0x1320e058> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "JarIndex Timer" daemon prio=6 tid=0x03b8a400 nid=0x14f0 in Object.wait() [0x0426f000]
       java.lang.Thread.State: TIMED_WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.util.TimerThread.mainLoop(Timer.java:509)
            - locked <0x13198070> (a java.util.TaskQueue)
            at java.util.TimerThread.run(Timer.java:462)
    "AWT-EventQueue-0" prio=6 tid=0x03b0f800 nid=0x16cc runnable [0x0415f000]
       java.lang.Thread.State: RUNNABLE
            at com.sleepycat.util.UtfOps.getCharLength(UtfOps.java:139)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:259)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            at com.sleepycat.persist.impl.ComplexFormat.readObject(ComplexFormat.java:485)
            at com.sleepycat.persist.impl.PersistEntityBinding.readEntity(PersistEntityBinding.java:90)
            at com.sleepycat.persist.impl.PersistEntityBinding.entryToObject(PersistEntityBinding.java:60)
            at com.sleepycat.persist.EntityValueAdapter.entryToValue(EntityValueAdapter.java:56)
            at com.sleepycat.persist.BasicCursor.returnValue(BasicCursor.java:214)
            at com.sleepycat.persist.BasicCursor.next(BasicCursor.java:78)
            at com.sleepycat.persist.BasicIterator.hasNext(BasicIterator.java:50)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2.getRowAt(HistoryDB2.java:169)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDBTableModel.getValueAt(HistoryDBTableModel.java:67)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.reallocateIndexes(SqlHistoryFilterModel.java:73)
            - locked <0x176fc820> (a oracle.dbtools.worksheet.sqlhistory.SqlHistoryPanel$1)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.tableChanged(SqlHistoryFilterModel.java:86)
            at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:280)
            at javax.swing.table.AbstractTableModel.fireTableDataChanged(AbstractTableModel.java:182)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2$1.run(HistoryDB2.java:72)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    "AWT-Windows" daemon prio=6 tid=0x03b3b000 nid=0x128c runnable [0x03f5f000]
       java.lang.Thread.State: RUNNABLE
            at sun.awt.windows.WToolkit.eventLoop(Native Method)
            at sun.awt.windows.WToolkit.run(WToolkit.java:291)
            at java.lang.Thread.run(Thread.java:619)
    "AWT-Shutdown" prio=6 tid=0x03b3a000 nid=0x1738 in Object.wait() [0x03e5f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
            - locked <0x13198278> (a java.lang.Object)
            at java.lang.Thread.run(Thread.java:619)
    "Java2D Disposer" daemon prio=10 tid=0x03b30800 nid=0xfa0 in Object.wait() [0x03d5f000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
            - locked <0x13198308> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            at sun.java2d.Disposer.run(Disposer.java:125)
            at java.lang.Thread.run(Thread.java:619)
    "Low Memory Detector" daemon prio=6 tid=0x03151400 nid=0x16bc runnable [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=10 tid=0x0314b800 nid=0x1270 waiting on condition [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Attach Listener" daemon prio=10 tid=0x0314a000 nid=0x5d4 runnable [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=10 tid=0x03148c00 nid=0x1780 waiting on condition [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=8 tid=0x03139c00 nid=0x17b8 in Object.wait() [0x034bf000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
            - locked <0x13140298> (a java.lang.ref.ReferenceQueue$Lock)
            at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
            at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=10 tid=0x03135000 nid=0x1048 in Object.wait() [0x033bf000]
       java.lang.Thread.State: WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
            - locked <0x13140320> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x00c77800 nid=0x1208 waiting on condition [0x00000000]
       java.lang.Thread.State: RUNNABLE
    "VM Thread" prio=10 tid=0x03131000 nid=0x15c0 runnable
    "VM Periodic Task Thread" prio=10 tid=0x0315bc00 nid=0x1140 waiting on condition
    JNI global references: 2778
    Heap
    def new generation   total 17792K, used 13245K [0x10010000, 0x11350000, 0x13140000)
      eden space 15872K,  80% used [0x10010000, 0x10c851f0, 0x10f90000)
      from space 1920K,  75% used [0x10f90000, 0x110fc180, 0x11170000)
      to   space 1920K,   0% used [0x11170000, 0x11170000, 0x11350000)
    tenured generation   total 235968K, used 147184K [0x13140000, 0x217b0000, 0x38010000)
       the space 235968K,  62% used [0x13140000, 0x1c0fc380, 0x1c0fc400, 0x217b0000)
    compacting perm gen  total 63744K, used 63628K [0x38010000, 0x3be50000, 0x40010000)
       the space 63744K,  99% used [0x38010000, 0x3be33278, 0x3be33400, 0x3be50000)
    No shared spaces configured.Hope that helps,
    K.
    [WinXp Sp3, JDK 1.6.0_16]

    I selectively deleted some filling insert scripts, still resulting in 2294 rows in 76431 lines, but dropping from 27066KB to 3254KB.
    Dumping from time to time, I see the thread still working, mostly as above:
            at com.sleepycat.util.UtfOps.getCharLength(UtfOps.java:139)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:259)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            ...but also:
            at java.util.Arrays.copyOfRange(Arrays.java:3209)
            at java.lang.String.<init>(String.java:215)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:262)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            ...and:
            at java.lang.Class.isAssignableFrom(Native Method)
            at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
            at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57)
            at java.lang.reflect.Field.set(Field.java:657)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            ...After about half an hour, the thread changed somewhat this (although shortly after the lines on top continued doing the same as above):
    "AWT-EventQueue-0" prio=6 tid=0x03b40c00 nid=0xc14 runnable [0x0415d000]
       java.lang.Thread.State: RUNNABLE
            at java.lang.Object.clone(Native Method)
            at com.sleepycat.je.dbi.CursorImpl.cloneCursor(CursorImpl.java:338)
            at com.sleepycat.je.dbi.CursorImpl.cloneCursor(CursorImpl.java:313)
            at com.sleepycat.je.Cursor.beginRead(Cursor.java:2395)
            at com.sleepycat.je.Cursor.retrieveNextAllowPhantoms(Cursor.java:2178)
            at com.sleepycat.je.Cursor.retrieveNext(Cursor.java:1992)
            at com.sleepycat.je.Cursor.getNext(Cursor.java:777)
            at com.sleepycat.util.keyrange.RangeCursor.doGetNext(RangeCursor.java:899)
            at com.sleepycat.util.keyrange.RangeCursor.getNext(RangeCursor.java:423)
            at com.sleepycat.persist.BasicCursor.next(BasicCursor.java:78)
            at com.sleepycat.persist.BasicIterator.hasNext(BasicIterator.java:50)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2.getRowAt(HistoryDB2.java:169)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDBTableModel.getValueAt(HistoryDBTableModel.java:67)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.getValueAt(SqlHistoryFilterModel.java:103)
            at oracle.dbtools.raptor.utils.TableSorter$Row.compareTo(TableSorter.java:328)
            at java.util.Arrays.mergeSort(Arrays.java:1144)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.mergeSort(Arrays.java:1155)
            at java.util.Arrays.mergeSort(Arrays.java:1156)
            at java.util.Arrays.sort(Arrays.java:1079)
            at oracle.dbtools.raptor.utils.TableSorter.getViewToModel(TableSorter.java:260)
            at oracle.dbtools.raptor.utils.TableSorter.modelIndex(TableSorter.java:267)
            at oracle.dbtools.raptor.utils.TableSorter.getValueAt(TableSorter.java:304)
            at javax.swing.JTable.getValueAt(JTable.java:2695)
            at javax.swing.JTable.prepareRenderer(JTable.java:5712)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryPanel$6.prepareRenderer(SqlHistoryPanel.java:247)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2075)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1977)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1773)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
            at javax.swing.JComponent.paintComponent(JComponent.java:763)
            at javax.swing.JComponent.paint(JComponent.java:1029)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JViewport.paint(JViewport.java:747)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JLayeredPane.paint(JLayeredPane.java:567)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a13a8> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5131)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
            at javax.swing.JComponent.paint(JComponent.java:1015)
            at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
            at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
            at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
            at java.awt.Container.paint(Container.java:1780)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
            at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
            at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
            at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
            at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)After about an hour in total, the UI got back, so I docked the pane and used the scroll bar to see if everything was there. About halfway, the UI froze again!
    Looking at the dump, it seems to start all over again:
            at java.util.Arrays.copyOfRange(Arrays.java:3209)
            at java.lang.String.<init>(String.java:215)
            at com.sleepycat.util.UtfOps.bytesToString(UtfOps.java:262)
            at com.sleepycat.bind.tuple.TupleInput.readString(TupleInput.java:152)
            at com.sleepycat.persist.impl.SimpleFormat$FString.newInstance(SimpleFormat.java:745)
            at com.sleepycat.persist.impl.RecordInput.readObject(RecordInput.java:175)
            at com.sleepycat.persist.impl.ReflectionAccessor$ObjectAccess.read(ReflectionAccessor.java:376)
            at com.sleepycat.persist.impl.ReflectionAccessor.readNonKeyFields(ReflectionAccessor.java:275)
            at com.sleepycat.persist.impl.ComplexFormat.readObject(ComplexFormat.java:485)
            at com.sleepycat.persist.impl.PersistEntityBinding.readEntity(PersistEntityBinding.java:90)
            at com.sleepycat.persist.impl.PersistEntityBinding.entryToObject(PersistEntityBinding.java:60)
            at com.sleepycat.persist.EntityValueAdapter.entryToValue(EntityValueAdapter.java:56)
            at com.sleepycat.persist.BasicCursor.returnValue(BasicCursor.java:214)
            at com.sleepycat.persist.BasicCursor.next(BasicCursor.java:78)
            at com.sleepycat.persist.BasicIterator.hasNext(BasicIterator.java:50)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDB2.getRowAt(HistoryDB2.java:169)
            at oracle.dbtools.worksheet.sqlhistory.db.HistoryDBTableModel.getValueAt(HistoryDBTableModel.java:67)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryFilterModel.getValueAt(SqlHistoryFilterModel.java:103)
            at oracle.dbtools.raptor.utils.TableSorter.getValueAt(TableSorter.java:304)
            at javax.swing.JTable.getValueAt(JTable.java:2695)
            at oracle.dbtools.worksheet.sqlhistory.SqlHistoryPanel$6.prepareRenderer(SqlHistoryPanel.java:257)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2075)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1977)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1773)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
            at javax.swing.JComponent.paintComponent(JComponent.java:763)
            at javax.swing.JComponent.paint(JComponent.java:1029)
            at javax.swing.JComponent.paintChildren(JComponent.java:864)
            - locked <0x131a12d0> (a java.awt.Component$AWTTreeLock)
            at javax.swing.JComponent.paint(JComponent.java:1038)
            at javax.swing.JViewport.paint(JViewport.java:711)
            at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
            at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1475)
            at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1406)
            at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:294)
            at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
            at javax.swing.JComponent.paintForceDoubleBuffered(JComponent.java:1065)
            at javax.swing.JViewport.paintView(JViewport.java:1642)
            at javax.swing.JViewport.windowBlitPaint(JViewport.java:1564)
            at javax.swing.JViewport.setViewPosition(JViewport.java:1118)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:1027)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1016)
            at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
            at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
            at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
            at javax.swing.JScrollBar.setValue(JScrollBar.java:446)
            at javax.swing.plaf.basic.BasicScrollBarUI$TrackListener.setValueFrom(BasicScrollBarUI.java:1220)
            at javax.swing.plaf.basic.BasicScrollBarUI$TrackListener.mouseDragged(BasicScrollBarUI.java:1162)
            at java.awt.Component.processMouseMotionEvent(Component.java:6311)
            at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3285)
            at java.awt.Component.processEvent(Component.java:6032)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4255)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)After about 10 minutes I saw my processor use drop to normal, so I switched back to the UI, which made the CPU rise high again!
    Sorry guy, at this point I killed sqldev. I will skip further testing until EA3, in the hope that will address these issues.
    I regret so much the history mechanism has changed. Why on earth did you guys do so?
    Everything was so accessible and responsive... Now various users noted various problems.
    Haven't you heard of the golden rule: "don't change working code"?
    Why not take care of all recent issues and revert to as it was before?
    A deceived K.

  • Quantity of SQL History shrinking

    I've noticed since about Dec. 2006 or Jan. 2007 that the quantity of SQL History kept has varied greatly and generally shrunk. In the last five days it has shrunk from 21 days to 10 days. I currently only have 47 entries in SQL History. I estimate that I execute a minimum of 20 unique queries every business day, so a significant number of my queries over the last 10 days are missing from SQL History.
    In addition, today I'm noticing that I only have entries from a single database connection in SQL History. I have executed queries against two database connections today and at least 4 others over the last week. But only one of those database connections is reflected.
    I've counted the entries in "SqlHistory.xml" and it matches the number of entries I see in the SQL History dialog.
    Any ideas on what is happening to my SQL History? I am aware of the bug that can wipe out all of the SQL History prior to the time when a second instance of SQL Developer is opened. In this case though, I still have 10 days of history and history for all but one database connection is missing.
    SQL Developer 1.1.2.25
    Oracle 10g Enterprise Edition 10.2.0.2.0 - 64bit (all databases I access are the same version)
    Java 1.5.0_05
    Windows XP Pro SP2
    132gb free space on the drive which has both Windows installed and SQL Developer.
    Pentium 4 3GHz
    2GB Ram

    Bill,
    I assume this happened on htmldb.oracle.com. I bet one of our (necessary) cleanup jobs kicked in and purged some old statements.
    Sergio

  • How to get sql server performance counters using query?

    Hai i want to see my sql server performance counters like, Full Scans/sec,  Buffer
    Cache Hit Ratio,  Database Transactions/sec, User
    Connections, Average Latch Wait Time (ms), Lock
    Waits/sec, Lock Timeouts/sec, Number
    of Deadlocks/sec, Total Server Memory, SQL
    Re-Compilations/sec, User Settable Query. If any one know how to get it by using query means, please help me.
    Thanks in advance

    Hello,
    Below is query created by Jonathan Kehayias for measuring Perfom counters using DMV sys.dm_os_performance_counter.
    You can download book from below link
    https://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/
    DECLARE @CounterPrefix NVARCHAR(30)
    SET @CounterPrefix = CASE WHEN @@SERVICENAME = 'MSSQLSERVER'
    THEN 'SQLServer:'
    ELSE 'MSSQL$' + @@SERVICENAME + ':'
    END ;
    -- Capture the first counter set
    SELECT CAST(1 AS INT) AS collection_instance ,
    [OBJECT_NAME] ,
    counter_name ,
    instance_name ,
    cntr_value ,
    cntr_type ,
    CURRENT_TIMESTAMP AS collection_time
    INTO #perf_counters_init
    FROM sys.dm_os_performance_counters
    WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Full Scans/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Index Searches/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Lazy Writes/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Page life expectancy'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'Processes Blocked'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'User Connections'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Waits/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Wait Time (ms)'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Re-Compilations/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
    AND counter_name = 'Memory Grants Pending'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'Batch Requests/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Compilations/sec'
    -- Wait on Second between data collection
    WAITFOR DELAY '00:00:01'
    -- Capture the second counter set
    SELECT CAST(2 AS INT) AS collection_instance ,
    OBJECT_NAME ,
    counter_name ,
    instance_name ,
    cntr_value ,
    cntr_type ,
    CURRENT_TIMESTAMP AS collection_time
    INTO #perf_counters_second
    FROM sys.dm_os_performance_counters
    WHERE ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Full Scans/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Access Methods'
    AND counter_name = 'Index Searches/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Lazy Writes/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Buffer Manager'
    AND counter_name = 'Page life expectancy'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'Processes Blocked'
    OR ( OBJECT_NAME = @CounterPrefix + 'General Statistics'
    AND counter_name = 'User Connections'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Waits/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Locks'
    AND counter_name = 'Lock Wait Time (ms)'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Re-Compilations/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'Memory Manager'
    AND counter_name = 'Memory Grants Pending'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'Batch Requests/sec'
    OR ( OBJECT_NAME = @CounterPrefix + 'SQL Statistics'
    AND counter_name = 'SQL Compilations/sec'
    -- Calculate the cumulative counter values
    SELECT i.OBJECT_NAME ,
    i.counter_name ,
    i.instance_name ,
    CASE WHEN i.cntr_type = 272696576
    THEN s.cntr_value - i.cntr_value
    WHEN i.cntr_type = 65792 THEN s.cntr_value
    END AS cntr_value
    FROM #perf_counters_init AS i
    JOIN #perf_counters_second AS s
    ON i.collection_instance + 1 = s.collection_instance
    AND i.OBJECT_NAME = s.OBJECT_NAME
    AND i.counter_name = s.counter_name
    AND i.instance_name = s.instance_name
    ORDER BY OBJECT_NAME
    -- Cleanup tables
    DROP TABLE #perf_counters_init
    DROP TABLE #perf_counters_second
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • SQL query performance issues.

    Hi All,
    I worked on the query a month ago and the fix worked for me in test intance but failed in production. Following is the URL for the previous thread.
    SQL query performance issues.
    Following is the tkprof file.
    CURSOR_ID:76  LENGTH:2383  ADDRESS:f6b40ab0  HASH_VALUE:2459471753  OPTIMIZER_GOAL:ALL_ROWS  USER_ID:443 (APPS)
    insert into cos_temp(
    TRX_DATE, DEPT, PRODUCT_LINE, PART_NUMBER,
    CUSTOMER_NUMBER, QUANTITY_SOLD, ORDER_NUMBER,
    INVOICE_NUMBER, EXT_SALES, EXT_COS,
    GROSS_PROFIT, ACCT_DATE,
    SHIPMENT_TYPE,
    FROM_ORGANIZATION_ID,
    FROM_ORGANIZATION_CODE)
    select a.trx_date,
    g.segment5 dept,
    g.segment4 prd,
    m.segment1 part,
    d.customer_number customer,
    b.quantity_invoiced units,
    --       substr(a.sales_order,1,6) order#,
    substr(ltrim(b.interface_line_attribute1),1,10) order#,
    a.trx_number invoice,
    (b.quantity_invoiced * b.unit_selling_price) sales,
    (b.quantity_invoiced * nvl(price.operand,0)) cos,
    (b.quantity_invoiced * b.unit_selling_price) -
    (b.quantity_invoiced * nvl(price.operand,0)) profit,
    to_char(to_date('2010/02/28 00:00:00','yyyy/mm/dd HH24:MI:SS'),'DD-MON-RR') acct_date,
    'DRP',
    l.ship_from_org_id,
    p.organization_code
    from   ra_customers d,
    gl_code_combinations g,
    mtl_system_items m,
    ra_cust_trx_line_gl_dist c,
    ra_customer_trx_lines b,
    ra_customer_trx_all a,
    apps.oe_order_lines l,
    apps.HR_ORGANIZATION_INFORMATION i,
    apps.MTL_INTERCOMPANY_PARAMETERS inter,
    apps.HZ_CUST_SITE_USES_ALL site,
    apps.qp_list_lines_v price,
    apps.mtl_parameters p
    where a.trx_date between to_date('2010/02/01 00:00:00','yyyy/mm/dd HH24:MI:SS')
    and to_date('2010/02/28 00:00:00','yyyy/mm/dd HH24:MI:SS')+0.9999
    and   a.batch_source_id = 1001     -- Sales order shipped other OU
    and   a.complete_flag = 'Y'
    and   a.customer_trx_id = b.customer_trx_id
    and   b.customer_trx_line_id = c.customer_trx_line_id
    and   a.sold_to_customer_id = d.customer_id
    and   b.inventory_item_id = m.inventory_item_id
    and   m.organization_id
         = decode(substr(g.segment4,1,2),'01',5004,'03',5004,
         '02',5003,'00',5001,5002)
    and   nvl(m.item_type,'0') <> '111'
    and   c.code_combination_id = g.code_combination_id+0
    and   l.line_id = b.interface_line_attribute6
    and   i.organization_id = l.ship_from_org_id
    and   p.organization_id = l.ship_from_org_id
    and   i.org_information3 <> '5108'
    and   inter.ship_organization_id = i.org_information3
    and   inter.sell_organization_id = '5108'
    and   inter.customer_site_id = site.site_use_id
    and   site.price_list_id = price.list_header_id
    and   product_attr_value = to_char(m.inventory_item_id)
    call        count       cpu   elapsed         disk        query      current         rows    misses
    Parse           1      0.47      0.56           11          197            0            0         1
    Execute         1   3733.40   3739.40        34893    519962154           11          188         0
    total           2   3733.87   3739.97        34904    519962351           11          188         1
    |         Rows Row Source Operation
    | ------------ ---------------------------------------------------
    |          188 HASH JOIN (cr=519962149 pr=34889 pw=0 time=2607.35)
    |          741 .TABLE ACCESS BY INDEX ROWID QP_PRICING_ATTRIBUTES (cr=519939426 pr=34889 pw=0 time=2457.32)
    |    254644500 ..NESTED LOOPS (cr=519939265 pr=34777 pw=0 time=3819.67)
    |    254643758 ...NESTED LOOPS (cr=8921833 pr=29939 pw=0 time=1274.41)
    |          741 ....NESTED LOOPS (cr=50042 pr=7230 pw=0 time=11.37)
    |          741 .....NESTED LOOPS (cr=48558 pr=7229 pw=0 time=11.35)
    |          741 ......NESTED LOOPS (cr=47815 pr=7223 pw=0 time=11.32)
    |         3237 .......NESTED LOOPS (cr=41339 pr=7223 pw=0 time=12.42)
    |         3237 ........NESTED LOOPS (cr=38100 pr=7223 pw=0 time=12.39)
    |         3237 .........NESTED LOOPS (cr=28296 pr=7139 pw=0 time=12.29)
    |         1027 ..........NESTED LOOPS (cr=17656 pr=4471 pw=0 time=3.81)
    |         1027 ...........NESTED LOOPS (cr=13537 pr=4404 pw=0 time=3.30)
    |          486 ............NESTED LOOPS (cr=10873 pr=4240 pw=0 time=0.04)
    |          486 .............NESTED LOOPS (cr=10385 pr=4240 pw=0 time=0.03)
    |          486 ..............TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_ALL (cr=9411 pr=4240 pw=0 time=0.02)
    |        75253 ...............INDEX RANGE SCAN RA_CUSTOMER_TRX_N5 (cr=403 pr=285 pw=0 time=0.38)
    |          486 ..............TABLE ACCESS BY INDEX ROWID HZ_CUST_ACCOUNTS (cr=974 pr=0 pw=0 time=0.01)
    |          486 ...............INDEX UNIQUE SCAN HZ_CUST_ACCOUNTS_U1 (cr=488 pr=0 pw=0 time=0.01)
    |          486 .............INDEX UNIQUE SCAN HZ_PARTIES_U1 (cr=488 pr=0 pw=0 time=0.01)
    |         1027 ............TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_LINES_ALL (cr=2664 pr=164 pw=0 time=1.95)
    |         2063 .............INDEX RANGE SCAN RA_CUSTOMER_TRX_LINES_N2 (cr=1474 pr=28 pw=0 time=0.22)
    |         1027 ...........TABLE ACCESS BY INDEX ROWID RA_CUST_TRX_LINE_GL_DIST_ALL (cr=4119 pr=67 pw=0 time=0.54)
    |         1027 ............INDEX RANGE SCAN RA_CUST_TRX_LINE_GL_DIST_N1 (cr=3092 pr=31 pw=0 time=0.20)
    |         3237 ..........TABLE ACCESS BY INDEX ROWID MTL_SYSTEM_ITEMS_B (cr=10640 pr=2668 pw=0 time=15.35)
    |         3237 ...........INDEX RANGE SCAN MTL_SYSTEM_ITEMS_B_U1 (cr=2062 pr=40 pw=0 time=0.33)
    |         3237 .........TABLE ACCESS BY INDEX ROWID OE_ORDER_LINES_ALL (cr=9804 pr=84 pw=0 time=0.77)
    |         3237 ..........INDEX UNIQUE SCAN OE_ORDER_LINES_U1 (cr=6476 pr=47 pw=0 time=0.43)
    |         3237 ........TABLE ACCESS BY INDEX ROWID MTL_PARAMETERS (cr=3239 pr=0 pw=0 time=0.04)
    |         3237 .........INDEX UNIQUE SCAN MTL_PARAMETERS_U1 (cr=2 pr=0 pw=0 time=0.01)
    |          741 .......TABLE ACCESS BY INDEX ROWID HR_ORGANIZATION_INFORMATION (cr=6476 pr=0 pw=0 time=0.10)
    |         6474 ........INDEX RANGE SCAN HR_ORGANIZATION_INFORMATIO_FK2 (cr=3239 pr=0 pw=0 time=0.03)Please help.
    Regards
    Ashish

    |    254644500 ..NESTED LOOPS (cr=519939265 pr=34777 pw=0 time=3819.67)
    |    254643758 ...NESTED LOOPS (cr=8921833 pr=29939 pw=0 time=1274.41)There is no way the optimizer should choose to process that many rows using nested loops.
    Either the statistics are not up to date, the data values are skewed or you have some optimizer parameter set to none default to force index access.
    Please post explain plan and optimizer* parameter settings.

  • SQL Developer SQL History no longer working 3.2.20.09.87

    Hi guys, The SQL History (F8) option has started to no longer work within my copy of OSD.
    it was working at one point but has gone away.
    I have confirmed that "Enable Local History" is enabled and has been set for 30 days history and 50 max revisions
    I have confirmed that I still have a SqlHistory.xml file located in my user\operator\AppData\Roaming\SQL Developer\ directory with entries in it (6933 rows of data)
    This started to happen after I started to play with the Garbage Collection settings to reduce the memory footprint of OSD.
    I have since restored all of my backed up delivered settings, rebooted and the SQL History will not show up again.
    My snippets and custom reports are working and I can still see the log detail where I used to see log and sql history options at the bottom of OSD.
    I'm using Windows 7 and can provide an OSD dump if it helps.
    Thanks...
    Tom
    Edited by: ERPDude on Mar 6, 2013 10:03 AM

    Hi Tom,
    Be careful about which preference settings relate to the functionality in question.
    1. Tools > Preferences > Environment > Local History > Enable relates to a worksheet's History tab when you File > Open
    2. Tools > Preferences > Database > Worksheet > SQL History Limit relates to View > SQL History pane.
    You do not say how you backed up and restored your settings during all your experimentation, but let's assume whatever you did was valid. Whenever some UI component mysteriously disappears, one thing I always check (usually just delete) is the windowinglayout.xml in system3.2.20.09.87\o.ide.11.1.1.4.37.59.48 of my user settings.
    For example, I can use the SQL History pane's tab context menu to Float it, then adjust it's size by dragging it's edges down to a grey square a few pixels wide/high. Close SQL Developer, reopen, View > SQL History. Darn! Where did it go?
    Hope this helps,
    Gary

  • Sql Loader Performance

    Hi
    i have some question about SQL Loader. i have to find answers but did not get from Google or Documentation. i want to know that is there any way to check whether Sql loader inserting records with Direct path or Conventional path. As we know there are restriction in Direct load. Direct-path inserts do not support all objects that conventional inserts do. Their functionality
    is restricted. If the database engine is not able to execute a direct-path insert, the operation is silently converted into a conventional insert. i have instruct Sql loader to insert using Direct=true and parallel as well. but it take 15 mint to loader 4 million record in table. i have observed its transfer rate is bit slow. i have oracle 11R2 on windows 2008 with 40GB RAM and SAN. how can i verify during execution either Sql loader load user Direct path or silently converted it conventional path. here is my sample control file. function used in control file will convert direct path to conventional?
    /c sqlldr userid='MSNV5Star/Aa123456@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=srv01)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))' control='C:\ControlFile.txt' log='C:\ Final Data.log' bad= 'C:\ Final Data.bad'  direct=true  PARALLEL=TRUE  skip=1 Errors=5000000
    LOAD DATA 
    INFILE 'C:\adeel loading\in\A06052010.txt'APPEND
    INTO TABLE GN_FILE_DATA_TABLE
    FIELDS TERMINATED BY "     " TRAILING NULLCOLS
    Operational_Date "to_date(:Operational_Date, 'YYYYMMDD')" ,
    Store_Code "TRIM(:Store_Code)" ,
    Txn_Void_Flag "TRIM(:Txn_Void_Flag)" ,
    Txn_Staff_Flag "TRIM(:Txn_Staff_Flag)" ,
    Txn_Aborted_Flag "TRIM(:Txn_Aborted_Flag)"     Edited by: Oracle Studnet on May 30, 2011 7:18 AM

    Pl do not post duplicates - sql Loader Performance
    Srini

  • How does Index fragmentation and statistics affect the sql query performance

    Hi,
    How does Index fragmentation and statistics affect the sql query performance
    Thanks
    Shashikala
    Shashikala

    How does Index fragmentation and statistics affect the sql query performance
    Very simple answer, outdated statistics will lead optimizer to create bad plans which in turn will require more resources and this will impact performance. If index is fragmented ( mainly clustered index,holds true for Non clustred as well) time spent in finding
    the value will be more as query would have to search fragmented index to look for data, additional spaces will increase search time.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    My TechNet Wiki Articles

  • T-SQL query performance (CLR func + webservice)

    Hi guys
    I have CLR function which accepts address as a parameter, calls geocoding webservice and returns some information (coordinates etc.)
    I run SQL query
    SELECT *FROM T CROSS APPLY CLR_Func(T.Address)F
    Table contains 8 million records and obviously query runs very slow.
    Do you know any nice way to improve performance in this situation?
    Thank you,
    Max

    No WHERE condition?  SQL Server will call the function 8 million times ....
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • SQL History - returning wrong statement if history is sorted

    I have searched the forum and not seen anything on this, but I have been getting the wrong SQL statement returned when I select Append/Replace.
    I have statements going back to 12-Jan-06 (using 804 since 13-Jan-06, 796 since 12-Jan-06 and 715 last year), so I don't know if I have hit the aging limit or not (I think I counted 221 entries).
    It seems to me that it works out the cursor position and then returns that statement number from the history - independently of resorting the history.
    For example, if I sort from oldest to newest (based on timestamp) and then select the bottom statement (displays as newest) and Replace, I get the oldest statement in the worksheet. If I select the top statement (displays as oldest) and Replace, I get the newest statement in the worksheet.
    This is further complicated by the fact that sorting on the Timestamp is doing an alpha-numeric sort, rather than a date sort. When sorting from oldest to newest, the bottom three timestamps are (in "oldest to newest" order) are:
    1/23/06 10:58 AM
    1/23/06 9:21 AM
    1/23/06 9:31 AM
    If I then remove the sorting, the statement returned is the correct one.

    It was great to get the fix for the SQL History returning the right statement if sorted (we got it in v1184).
    However v1215 still does a text sort on the TimeStamp column rather than a date sort, so 2PM comes before 9AM, etc.
    Also, where is the format for the TimeStamp column coming from? As someone who doesn't live in the US and thinks that days should come before months in date formats (ie DD-Mon-YYYY), I am frustrated by yet another product that uses MM/DD/YY, despite my best efforts at telling it otherwise.

  • SQL Broker Performance Reports are empty

    Good day,
    I'm running SCOM 2012 SP1. I was requested to deliver a couple reports for an SQL migration/upgrade.
    The relevant data is in The SQL Broker Performance Reports both for SQL 2008 and 2012.
    I have been looking at troubleshooting article such as: http://support.microsoft.com/kb/2573329
    And all my system configs are OK, as well as positive logs. I have reviewed overrides and enable all performance ovverides on SQL MP just to see if it was going to make a change. I added an MP from VEEAM (quite cool actually) thinking I would get better
    results but that also failed.
    Has anyone encountered this issue before. The funny thing is that other reports give data :-).
    Is there something I need to enable further, am no SQL guru.
    Best regards,
    Dominique.

    Hi,
    How about Clear the Cache for the SQL agent by following the below steps?
    In the Monitoring workspace, expand Operations Manager and then expand
    Agent Details.
    Click Agent Health State.
    In Agent State, click an agent.
    In the Tasks pane, click Flush Health Service State and Cache
    In addition, we may
    1) stop scom agent Service (OPsMgr Health service)
    2) rename forlder.C:\Program Files\System Center Operations Manager 2012\health service state.
    3) start scom agent Service.
    Hope this helps.
    Regards,
    Yan Li
    Regards, Yan Li

  • SQL History and timestamp order

    Hi, I have SQL Developer 12.84 (4.0.0.12).
    Sql history forces MM/DD/RR format in Timestamp instead of NLS format: DD.MM.YYYY HH24:MI:SS.
    As a consequence the sort order fails.
    Played with  C:\Users\<user>\AppData\Roaming\SQL Developer\SqlHistory files but each new entry ignores manual date changes and writes timestamp in strange format.
    Any idea?

    Already identified by developer team as:
    Bug 17740406 - SQL HISTORY TIMESTAMP NOT SORTED AS DATE FOR NON-US LOCALES
    Info based on: https://forums.oracle.com/thread/2601066 (why new thread)
    This is important drawback in SQL Developer 4 for non US users. BTW, still not fixed in build 13.30 (4.0.0.13)

  • EA3 - SQL History window refresh problem

    Hi, I have noticed that version 1.2 (possibly farther back) up to and including 1.5 EA3 have a issue with refreshing the SQL history window in a special scenario.
    If the tab is completely undocked from SQL developer and then expanded across two monitors, as I scroll down the parts of the data rows on the non-primary monitor are not refreshed and become jagged.
    I am running SQL developer on Win XP SP2 with whatever version of Java came with EA3.

    Thanks, that seemed to work. It looks like Java is painting the grid in two parts now, with the non-default monitor side being second, but at least it repaints.
    As far as a default, I did already have the following option in the config file:
    AddVMOption -Dsun.java2d.ddoffscreen=false
    I don't what difference the -J option makes but that's what I had. Thanks again.

Maybe you are looking for

  • Purchased music from multiple itunes accounts on the same computer

    I mistakenly opened up two itune accounts and have purchased music using both accounts. The problem is that itunes won't let me download my purchased music from one of the accounts to my ipod. It will download all of the music from account "a" but no

  • My lenovo sl510 mic mute and light button not working

    The mic mute button lights up if the sound is muted. However, for the mic, there's no light, whether the mic is muted or not. Is there anybody else who sees the issue? Any solutions?

  • Logical dataguard problem

    Hi all, I have prepared a logical dataguard on two local systems. My oracle version is 9i and linux version is Entreprise Linux 3.0. Today when i tried to execute spcreate.sql on the primary database it had thrown some errors in my secondary database

  • Upgrade 3.1.1 to 3.1.2

    Hi Friends, My Apex was originally Apex 2.2 bundled in 10g XE. Then I downloaded Apex 3.1.1 and do the upgrade. Then comes a new Apex 3.1.2. Is this version compatible with 10gXE too? Thanks

  • How movement type is determine in out bound delivery?

    Hello, (1) I want to know, how movement type is determine in out bound delivery (item detail --->Administration tab).   If I want to make a setting of customer return, then where can I assign movement type 451 so that it will appear in OBD? (iii) Ple