Pls help in performance issue.

Suppose I have one table tmp_test and it contains 3 records...
ex
15/11/2007 25/11/2007 50
05/01/2007 10/01/2007 100
05/01/2007 10/12/2007 20
and I fire one query
SELECT DISTINCT from_Date+LEVEL-1 AS TRAN_DATE,qty , LEVEL FROM
(SELECT from_DATE, TO_DATE,qty FROM tmp_test)
CONNECT BY LEVEL <=TO_DATE-from_DATE+1
it shows me proper output i.e. 351 rows
But it takes around 10 mins to execute. can we reduce execution time?
Thaks and Regards...
Prashant T.

Firstly I would advise you to visit the following thread;
When your query takes too long ...
You need to post the explain plans, etc.
You should give details like the database version.
Adith

Similar Messages

  • Pls help.. Issue with plug in installation

    I am facing some issues in installing pulgins with flex
    builder3 through updater.
    Actually i am trying to install updates from flex builder for
    UML diagramming tools.
    After installing all the required packages, still the feature
    is not visible in the IDE.
    When i tried to see the problem. i noticed that the installed
    plugins are in disabled state. i cudnt see the option to enable.
    so anybody pls help me in that..
    Packeages i have added are: MDT, JDT, EMF, GMF, GEF

    I set up a new admin user account, logged in, but the problem persists.
    I take this to mean that you still can't mount any downloads. What you're saying is that you can't mount any .dmg file by double-clicking on it. Is that correct? If so, see http://docs.info.apple.com/article.html?artnum=75098 and http://docs.info.apple.com/article.html?artnum=106692 for potential fixes. One other thing to try is reinstall the 10.4.3 Combo update before trying to reinstall Safari or the entire OS.

  • MACBOOK: PLS HELP: Slower performance?

    Hi there. I've just bought the Macbook Black, Intel Core Duo, 2GHz, 1GB MemoryRam (upgraded), 80GB harddisk, etc etc. I used to have a Powerbook G4.
    I'm however disappointed in MacBook. I used some of it's applications, i.e. Comic Strip, iTunes, etc, it was at a reasonable pace, although a tad slower than my old G4. Then I installed MS Office for Mac, and I tried using it's applications, somehow it slowed down considerably. So most applications I use becomes a nightmare coz it takes ages to perform one command! Pls someone tell me, why this is, and what I can do to speed up it's performance?
    Another question: when we buy Macbook, is it not supposed to come with all the softwares CDs (Mac OS CD, Apple Applications CDs..etc) too? All I have is the Install CDs.
    MacBook   Mac OS X (10.4.6)  
    MacBook   Mac OS X (10.4.6)  

    Office works faster right now on a PowerBook G4 because it was written for the G4 processor. The new MacBooks use Intel Core Duo processors that are totally different.
    Think of it this way. My primary language is English. I can communicate (run programs) quickly and efficiently in English (My Intel-powered MacBook). I know a little spanish (PPC), but I am far from fluent. In spanish, it takes me longer to come up with the right words to say what I want. And if I hear anything, I have to "translate" it in my head and think about the meaning in english. Rosetta is the "program" on the Intel macs that can "translate" programs from PPC to Intel code. There's a bit of a speed hit and it uses a lot of RAM.
    If you use PowerPoint a lot, you might think about looking into apple's iWork suite, which includes a powerpoint-like program called Keynote. Keynote can import PowerPoint files and export to PowerPoint, and it is Intel native so it runs quickly.
    The "processor whirring" that you are talking about, I believe is the macbook's fan for cooling, or if it is even more quiet, it is probably the hard drive spinning. The processor itself should not make any noise, although there are some reports of the processors or graphics card making a high-pitched "whine" sound, which I wouldn't necessarily describe as "whirring".
    Are you in a place with pretty high ambient temperatures? If it is summer where you are, and you're causing high processor use, the fan is more likely to run, but lower use where it idles a lot, such as when typing emails and light web-surfing shouldn't cause the fan to run noisily all the time. In that situation, I think you might want to call AppleCare and see if your computer needs a repair. They can also walk you through the process of resetting the PRAM and power manager, which may help if you're experiencing weird fan and power irregularities.
    Personally, although I have installed and updated the Office 2004 suite on my MacBook, I have not used it much since installing, so I can't tell you how it works for me. I haven't had any moments on my computer where it felt very sluggish, but I am using mostly Universal Binary Intel-native programs. Right now I have Mail.app, Safari, iChat, Parallels (the virtual WIndows XP program), iTunes, and Terminal open with 574MB out of my 2GB of RAM free.
    I hope that you can solve this problem!

  • Need your help on performance issue please

    Hello everyone!
    I need your help to understand an effect I notice with a Thread class I built. I currently work on enhancement of my application Playlist Editor (see http://www.lightdev.com/page74.htm) and a new release will be available soon.
    Among other extensions the new release will have a title filter function which is based on audio data that is recursively read from ID3 tags of files found in a given root directory. The data collection is done by a CollectionThread class which reads into a data model class AudioDataModel and the entire process works fine, no problem with that.
    However, when my application is started for the first time the CollectionThread runs approximately 3 minutes to collect data from approximately 4300 audio files on an Intel Pentium M 1,4 GHz, 512 MB RAM, Windows XP SP2. When the application is shut down and started again, it takes only a few seconds to do the same task for all subsequent launches.
    I already tried to start the application with java option -Xms40m to increase initial heap size. This increases performance in general but the effect is still the same, i.e. first run lasts significantly longer than subsequent runs.
    I also tried to build a pool mechanism which creates many empty objects in the data model and then releases them to contain the actual data at is being read in but this did not lead to better performance.
    It must have to do with how Java (or Windows?) allocates and caches memory. I wonder whether there is a way to pre-allocate memory or if there are any other ideas to improve performance so that the process always only takes seconds instead of minutes?
    I attach the key classes to this message. Any help or ideas is much appreciated!
    Thanks a lot a best regards
    Ulrich
    PS: You can use the news subscription service at
    http://www.lightdev.com/dynTemplate.php4?id=80&dynPage=subscribe.php4 to be informed when the new release of Playlist Editor is available.
    All classes posted here do not need debugging, they already have proven to run error free. The classes are only posted for information for the interested reader - no need to go through all the stuff in detail - only if it interests you.
    My application calls class CollectionThread wich is a subclass of InfoThread. CollectionThread recursively goes through a directory and file structure and stores found ID3 tag information in instances of class ID3v11Tag which in turn gets stored in one instance of class AudioDataModel. All classes are shown below.
    This is the mentioned CollectionThread
    * Light Development Playlist Editor
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.app.playlisteditor.data;
    import com.lightdev.lib.util.InfoThread;
    import java.io.File;
    * A class to collect audio data from a given storage location.
    * <p>
    * <code>CollectionThread</code> uses ID3 tag information to gain data.
    * </p>
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software as well as any licensing notes
    *      inside this documentation
    * @version 1, October 13, 2004
    public class CollectionThread extends InfoThread {
       * constructor
       * @param model  AudioDataModel  the data model to collect data to
      public CollectionThread(AudioDataModel model) {
        this.model = model;
       * constructor, creates a new empty AudioDataModel
      public CollectionThread() {
        this(new AudioDataModel());
       * set the data model to collect data to
       * @param model AudioDataModel  the model to collect data to
      public void setModel(AudioDataModel model) {
        this.model = model;
       * get the data model associated to this thread
       * @return AudioDataModel  the data model
      public AudioDataModel getModel() {
        return model;
       * set the directory to collect data from
       * @param rootDir File  the directory to collect data from
      public void setRootDirectory(File rootDir) {
        this.rootDir = rootDir;
       * do te actual work of this thread, i.e. iterate through a given directory
       * structure and collect audio data
       * @return boolean  true, if work is left
      protected boolean work() {
        boolean workIsLeft = true;
        maxValue = -1;
        filesProcessed = 0;
        if(getStatus() < STATUS_HALT_PENDING) {
          countElements(rootDir.listFiles());
        if(getStatus() < STATUS_HALT_PENDING) {
          workIsLeft = collect(rootDir.listFiles());
        return workIsLeft;
       * count the elements in a given file array including its subdirectories
       * @param files File[]
      private void countElements(File[] files) {
        int i = 0;
        while (i < files.length && getStatus() < STATUS_HALT_PENDING) {
          File file = files;
    if (file.isDirectory()) {
    countElements(file.listFiles());
    i++;
    maxValue++;
    * recursively read data into model
    * @param files File[] the file array representing the content of a given directory
    private boolean collect(File[] files) {
    int i = 0;
    while(i < files.length && getStatus() < STATUS_HALT_PENDING) {
    File file = files[i];
    if(file.isDirectory()) {
    collect(file.listFiles());
    else if(file.getName().toLowerCase().endsWith("mp3")) {
    try {
    model.addTrack(file);
    catch(Exception e) {
    fireThreadException(e);
    i++;
    filesProcessed++;
    fireThreadProgress(filesProcessed);
    return (i<files.length);
    /** the directory to collect data from */
    private File rootDir;
    /** the data model to collect data to */
    private AudioDataModel model;
    /** the number of files this thread processed so far while it is running */
    private long filesProcessed = 0;
    This is class InfoThread
    * Light Development Java Library
    * Copyright (C) 2003, 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.util;
    import java.util.Vector;
    import java.util.Enumeration;
    * Abstract class <code>InfoThread</class> implements a status and listener concept.
    * An <code>InfoThread</code> object actively informs all objects registered as listeners about
    * status changes, progress and possible exceptions. This way the status of a running
    * thread does not require a polling mechanism to be monitored.
    * <p>
    * <code>InfoThread</code> implements the following working scheme
    * </p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public abstract class InfoThread extends Thread {
       * construct an <code>InfoThread</code> object
       * <p>This class is meant to be used when a <code>Thread</code> object is needed that actively
       * informs other objects about its status</code>. It is a good idea therefore to register
       * one or more listeners with instances of this class before doing anything
       * else.</p>
       * @see addInfoThreadListener
      public InfoThread() {
       * set the amount of time this thread shall idle after it is through with one
       * work cycle and before a next work cycle is started. This influences the time
       * other threads have for their work.
       * @param millis long  the number of milliseconds to idle after one work cycle
      public void setIdleMillis(long millis) {
        idleMillis = millis;
       * Causes this thread to begin execution; the Java Virtual Machine calls the <code>run</code>
       * method of this thread. Calls method <code>prepareThread</code> before calling
       * <code>run</code>.
       * @see run
       * @see prepareThread
      public synchronized void start() {
        setStatus(STATUS_INITIALIZING);
        prepareThread();
        setStatus(STATUS_READY);
        super.start();
       * call method <code>start</code> instead of this method.
       * calling this method directly will lead to an exception
       * @see start
      public void run() {
        //System.out.println("InfoThread.run");
        if (status == STATUS_READY) {
          boolean workIsLeft = true;
          setStatus(STATUS_RUNNING);
          while (status < STATUS_STOP_PENDING && workIsLeft) {
            if (status < STATUS_HALT_PENDING) {
              workIsLeft = work();
              if(!workIsLeft) {
                setStatus(STATUS_WORK_COMPLETE);
            if (status == STATUS_HALT_PENDING) {
              setStatus(STATUS_HALTED);
            else if (status == STATUS_STOP_PENDING) {
              setStatus(STATUS_STOPPED);
            else {
              try {
                sleep(idleMillis);
              catch (InterruptedException e) {
                fireThreadException(e);
        else {
          // error: Thread is not ready to run
        setStatus(STATUS_THREAD_FINISHED);
       * stop this thread. This will terminate the thread irrevokably. Use method
       * <code>haltThread</code> to pause a thread with the possiblity to resume work later.
       * @see haltThread
      public void stopThread() {
        switch (status) {
          case STATUS_RUNNING:
            setStatus(STATUS_STOP_PENDING);
            break;
          case STATUS_HALT_PENDING:
            // exception: the thread already is about to halt
            break;
          case STATUS_STOP_PENDING:
            // exception: the thread already is about to stop
            break;
          default:
            // exception: a thread can not be stopped, when it is not running
            break;
       * halt this thread, i.e. pause working allowing to resume later
       * @see resumeThread
      public void haltThread() {
        switch (status) {
          case STATUS_RUNNING:
            setStatus(STATUS_STOP_PENDING);
            break;
          case STATUS_HALT_PENDING:
            // exception: the thread already is about to halt
            break;
          case STATUS_STOP_PENDING:
            // exception: the thread already is about to stop
            break;
          default:
            // exception: a thread can not be halted, when it is not running
            break;
       * resume this thread, i.e. resume previously halted work
       * @see haltThread
      public void resumeThread() {
        if(status == STATUS_HALTED || status == STATUS_HALT_PENDING) {
          setStatus(STATUS_RUNNING);
        else {
          // exception: only halted threads or threads that are about to halt can be resumed
       * this is the method to prepare a thread to run. It is not implemented in this abstract
       * class. Subclasses of <code>InfoThread</code> can implement this method to do anything
       * that might be required to put their thread into STATUS_READY. This method is called
       * automatically by method <code>start</code>.  When implementing this method, it should
       * call method <code>fireThreadException</code> accordingly.
       * @see start
       * @see fireThreadException
      protected void prepareThread() {
        // does nothing in this abstract class but might be needed in subclasses
       * this is the main activity method of this object. It is not implemented in this abstract
       * class. Subclasses of <code>InfoThread</code> must implement this method to do something
       * meaningful. When implementing this method, it should call methods
       * <code>fireThreadProgress</code> and <code>fireThreadException</code> accordingly.
       * @return boolean true, if work is left, false if not
       * @see fireThreadProgress
       * @see fireTreadException
      protected abstract boolean work();
       * add an <code>InfoTreadListener</code> to this instance of <code>InfoThread</code>
       * @param l InfoThreadListener  the listener to add
       * @see removeInfoThreadListener
      public void addInfoThreadListener(InfoThreadListener l) {
        listeners.add(l);
       * remove an <code>InfoTreadListener</code> from this instance of <code>InfoThread</code>
       * @param l InfoThreadListener  the listener to remove
      public void removeInfoThreadListener(InfoThreadListener l) {
        listeners.remove(l);
       * notify all <code>InfoThreadListener</code>s of a status change
       * @param fromStatus int  the status tis thread had before the change
       * @param toStatus int  the status this thread has now
      protected void fireThreadStatusChanged(int fromStatus, int toStatus) {
        Enumeration e = listeners.elements();
        while(e.hasMoreElements()) {
          Object l = e.nextElement();
          if(l instanceof InfoThreadListener) {
            ((InfoThreadListener) l).threadStatusChanged(this, fromStatus, toStatus);
       * notify all <code>InfoThreadListener</code>s of an exception in this thread
       * @param ex Exception  the exception that occurred
      protected void fireThreadException(Exception ex) {
        Enumeration e = listeners.elements();
        while(e.hasMoreElements()) {
          Object l = e.nextElement();
          if(l instanceof InfoThreadListener) {
            ((InfoThreadListener) l).threadException(this, ex);
       * notify all <code>InfoThreadListener</code>s of the progress of this thread
       * @param progressValue long  a value indicating the current thread progress
      protected void fireThreadProgress(long progressValue) {
        Enumeration e = listeners.elements();
        while(e.hasMoreElements()) {
          Object l = e.nextElement();
          if(l instanceof InfoThreadListener) {
            ((InfoThreadListener) l).threadProgress(this, progressValue, maxValue);
       * set the status of this thread and notify all listeners
       * @param newStatus int  the status this thread is to be changed to
      private void setStatus(int newStatus) {
        //System.out.println("InfoThread.setStatus oldStatus=" + status + ", newStatus=" + newStatus);
        int fromStatus = status;
        status = newStatus;
        fireThreadStatusChanged(fromStatus, newStatus);
       * get the current status of this thread
       * @return int  the status
      public int getStatus() {
        return status;
       * cleanup before actual destruction.
      public void destroy() {
        //System.out.println("InfoThread.destroy");
        cleanup();
        super.destroy();
       * cleanup all references this thread maintains
      private void cleanup() {
        //System.out.println("InfoThread.cleanup");
        listeners.removeAllElements();
        listeners = null;
      /* ----------------------- class fields start ------------------------ */
      /** storage for the objects this thread notifies about status changes and progress */
      private Vector listeners = new Vector();
      /** indicator for the status of this thread */
      private int status = STATUS_NONE;
      /** maximum value for threadProgress */
      protected long maxValue = -1;
      /** the idle time inside one work cycle in milliseconds */
      protected long idleMillis = 1;
      /* ----------------------- class fields end -------------------------- */
      /* ----------------------- constants start --------------------------- */
      /** constant value indicating that no status has been set so far */
      public static final int STATUS_NONE = 0;
      /** constant value indicating that the thread is currently initializing */
      public static final int STATUS_INITIALIZING = 1;
      /** constant value indicating that the thread is ready to run */
      public static final int STATUS_READY = 2;
      /** constant value indicating that the thread is running */
      public static final int STATUS_RUNNING = 3;
      /** constant value indicating that the thread is about to halt */
      public static final int STATUS_HALT_PENDING = 4;
      /** constant value indicating that the thread is halted */
      public static final int STATUS_HALTED = 5;
      /** constant value indicating that the work of this thread is complete */
      public static final int STATUS_WORK_COMPLETE = 6;
      /** constant value indicating that the thread is about to stop */
      public static final int STATUS_STOP_PENDING = 7;
      /** constant value indicating that the thread is stopped */
      public static final int STATUS_STOPPED = 8;
      /** constant value indicating that the thread is finished */
      public static final int STATUS_THREAD_FINISHED = 9;
      /* ----------------------- constants end --------------------------- */
    }this is the InfoThreadListener interface
    * Light Development Java Library
    * Copyright (C) 2003, 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.util;
    * An interface classes interested to receive events from objects
    * of class <code>InfoThread</code> need to implement.
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public interface InfoThreadListener {
       * method to receive a status change notification from a thread
       * @param thread InfoThread  the thread which status changed
       * @param fromStatus int  the status which the thread had before the change
       * @param toStatus int  the status which the thread has now
      public void threadStatusChanged(InfoThread thread, int fromStatus, int toStatus);
       * method to receive a notification about the progress of a thread
       * @param thread InfoThread  the thread which notified about its progress
       * @param progressValue long  the value (e.g. 10 if 100 percent completed, 20 of 1 million files processed, etc.)
      public void threadProgress(InfoThread thread, long progressValue, long maxValue);
       * method to receive a notifiaction about the fact that an exception occurred in a thread
       * @param thread InfoThread  the thread for which an exception occurred
       * @param e Exception  the exception that occurred
      public void threadException(InfoThread thread, Exception e);
    }This is class AudioFileDescriptor
    * Light Development Java Library
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.audio;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import java.io.Serializable;
    import java.text.DecimalFormat;
    * This class models characteristics of an audio file such as the absolute path
    * of the file, its tag contents (if any) and the play duration, etc.
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public class AudioFileDescriptor implements Serializable, Comparable {
      public AudioFileDescriptor(String absolutePath) throws FileNotFoundException, IOException {
        load(absolutePath);
      public boolean equals(Object o) {
        if(o != null && o instanceof AudioFileDescriptor) {
          return ((AudioFileDescriptor) o).getAbsolutePath().equalsIgnoreCase(this.getAbsolutePath());
        else {
          return false;
      public void load(String absolutePath) throws FileNotFoundException, IOException {
        this.absolutePath = absolutePath;
        RandomAccessFile rf = new RandomAccessFile(absolutePath, "r");
        if(id3v11Tag == null) {
          id3v11Tag = new ID3v11Tag(rf, false);
        else {
          id3v11Tag.readTag(rf, rf.length() - 128);
        rf.close();
      public String getAbsolutePath() {
        return absolutePath;
      public ID3v11Tag getID3v11Tag() {
        return id3v11Tag;
      public void setID3v11Tag(ID3v11Tag tag) {
        this.id3v11Tag = tag;
      public String toString() {
        DecimalFormat df = new DecimalFormat("00");
        return id3v11Tag.getArtist() + ", " + id3v11Tag.getAlbum() + " - " +
            df.format(id3v11Tag.getTrackNumber()) + " " + id3v11Tag.getTitle();
       * Compares this object with the specified object for order.
       * @param o the Object to be compared.
       * @return a negative integer, zero, or a positive integer as this object is less than, equal to,
       *   or greater than the specified object.
       * @todo Implement this java.lang.Comparable method
      public int compareTo(Object o) {
        return toString().compareTo(o.toString());
      private String absolutePath;
      private ID3v11Tag id3v11Tag;
      private transient long duration = -1;
      private transient int type = TYPE_UNKNOWN;
      public static final transient int TYPE_UNKNOWN = 0;
      public static final transient int TYPE_MP3 = 1;
    }This is class ID3V11Tag into which the data is actually stored
    * Light Development Java Library
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.lib.audio;
    import java.io.File;
    import java.io.RandomAccessFile;
    import java.io.IOException;
    import java.io.Serializable;
    import java.text.DecimalFormat;
    * This class is a very simple implementation of an ID3v11Tag. It models an ID3 tag
    * pretty much the same way as it is physically stored inside an audio file.
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software
    * @version Version 1, October 13, 2004
    public class ID3v11Tag implements Serializable, Comparable {
       * construct an ID3v11Tag and read tag content from a given file
       * <p>This constructor can be used for cases where a RandomAccessFile has already
       * been opened and will be closed elsewhere</p>
       * @param rf RandomAccessFile  the open file to read from
       * @param isAtTagStartPos boolean  true, if the file pointer is at the
       * position where the ID3 tag starts; when false, the pointer is positioned accordingly here
       * @throws IOException
      public ID3v11Tag(RandomAccessFile rf, boolean isAtTagStartPos) throws IOException {
        if(isAtTagStartPos) {
          readTag(rf);
        else {
          readTag(rf, rf.length() - 128);
       * construct an ID3v11Tag and read tag content from a file at a given location
       * <p>This constructor opens and closes the audio file for reading</p>
       * @param absolutePath String  the absolute path to the audio file to open
       * @throws IOException
      public ID3v11Tag(String absolutePath) throws IOException {
        RandomAccessFile rf = new RandomAccessFile(absolutePath, "r");
        readTag(rf, rf.length() - 128);
        rf.close();
       * construct an ID3v11Tag and read tag content from a given file
       * <p>This constructor opens and closes the audio file for reading</p>
       * @param audioFile File  the audio file to read from
       * @throws IOException
      public ID3v11Tag(File audioFile) throws IOException {
        this(audioFile.getAbsolutePath());
       * get a string representation of this object
       * @return String
      public String toString() {
        DecimalFormat df = new DecimalFormat("00");
        return getArtist() + ", " + getAlbum() + " - " + df.format(getTrackNumber()) + " " + getTitle();
       * position to file pointer and read the tag
       * @param rf RandomAccessFile  the file to read from
       * @param jumpPos long  the position to jump to (the tag start position)
       * @throws IOException
      public void readTag(RandomAccessFile rf, long jumpPos) throws IOException {
        rf.seek(jumpPos);
        readTag(rf);
       * read the tag from a given file, assuming the file pointer to be at the tag start position
       * @param rf RandomAccessFile  the file to read from
       * @throws IOException
      public void readTag(RandomAccessFile rf) throws IOException {
        rf.read(tagBuf);
        if(tag.equalsIgnoreCase(new String(tagBuf))) {
          rf.read(title);
          rf.read(artist);
          rf.read(album);
          rf.read(year);
          rf.read(comment);
          rf.read(trackNo);
          rf.read(genre);
      public String getTitle() {
        return new String(title).trim();
      public String getArtist() {
        return new String(artist).trim();
      public String getAlbum() {
        return new String(album).trim();
      public String getYear() {
        return new String(year).trim();
      public String getComment() {
        return new String(comment).trim();
      public int getGenreId() {
        try {
          int id = new Byte(genre[0]).intValue();
          if(id < GENRE_ID_MIN || id > GENRE_ID_MAX) {
            return GENRE_ID_OTHER;
          else {
            return id;
        catch(Exception ex) {
          return GENRE_ID_OTHER;
      public String getGenreName() {
        return genreNames[getGenreId()];
      public int getTrackNumber() {
        try {
          return (int) trackNo[0];
        catch(Exception e) {
          return 0;
       * Compares this object with the specified object for order.
       * @param o the Object to be compared.
       * @return a negative integer, zero, or a positive integer as this object is less than, equal to,
       *                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Franck,
    thank you, mate. I did what you suggested (changed class attached) but that did not change the mentioned behaviour.
    The first run is approximately 75 seconds with Java option -Xms40m and approx. double without, the second run and all subsequent runs are only 2-3 seconds each (!!!) even when terminating and re-starting the application between thread runs.
    I'm pretty clueless about that, any more help on this anyone?
    Thanks a lot and best regards
    Ulrich
    PS: BTW, I forgot to post the class that is filled with data by class CollectionThread, so here it is
    * Light Development Playlist Editor
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.app.playlisteditor.data;
    import java.io.File;
    import com.lightdev.lib.audio.ID3v11Tag;
    import javax.sound.sampled.UnsupportedAudioFileException;
    import java.io.IOException;
    import java.io.Serializable;
    import com.lightdev.lib.audio.AudioFileDescriptor;
    import com.lightdev.lib.ui.SortListModel;
    import java.util.Iterator;
    * Storage model for audio data.
    * <p>
    * <code>AudioDataModel</code> can be used to store ID3 tag data collected from
    * a directory with audio files to perform queries and reports on the found data.
    * </p>
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software as well as any licensing notes
    *      inside this documentation
    * @version 1, October 15, 2004
    public class AudioDataModel extends SortListModel implements Serializable {
       * constructor
      public AudioDataModel() {
       * add an audio track from a given audio file
       * <p>This will attempt to read ID3 tag data from the file.</p>
       * @param audioFile File  the file to add audio data for
       * @throws IOException
      public void addTrack(File audioFile) throws IOException {
        AudioFileDescriptor afd = new AudioFileDescriptor(audioFile.getAbsolutePath());
        if (!data.contains(afd)) {
          data.add(afd);
       * get all tracks for agiven combination of genre name, artist name and album name. Any of
       * the parameters may be null or AudioDataModel.FILTER_ALL
       * <p>Ugly code, I know, but it simply hard codes all combinations of the the mentioned
       * parameters. Any more elegant implementations welcome.</p>
       * @param genreName String  a genre name to get tracks for
       * @param artistName String  an artist name to get tracks for
       * @param albumName String  an album name to get tracks for
       * @return SortListModel   the found tracks in a list model
      public SortListModel getTracks(String genreName, String artistName, String albumName) {
        SortListModel foundTracks = new SortListModel();
        Iterator e = data.iterator();
        while(e.hasNext()) {
          AudioFileDescriptor afd = (AudioFileDescriptor) e.next();
          ID3v11Tag tag = afd.getID3v11Tag();
          if(genreName == null || genreName.equalsIgnoreCase(FILTER_ALL)) {
            if(artistName == null || artistName.equalsIgnoreCase(FILTER_ALL)) {
              if (tag.getAlbum().equalsIgnoreCase(albumName))
                foundTracks.add(afd);
            else {
              if(albumName == null || albumName.equalsIgnoreCase(FILTER_ALL)) {
                if (tag.getArtist().equalsIgnoreCase(artistName))
                  foundTracks.add(afd);
              else {
                if (tag.getArtist().equalsIgnoreCase(artistName) &&
                    tag.getAlbum().equalsIgnoreCase(albumName))
                  foundTracks.add(afd);
          else {
            if(artistName == null || artistName.equalsIgnoreCase(FILTER_ALL)) {
              if(albumName == null || albumName.equalsIgnoreCase(FILTER_ALL)) {
                if (tag.getGenreName().equalsIgnoreCase(genreName))
                  foundTracks.add(afd);
              else {
                if (tag.getGenreName().equalsIgnoreCase(genreName) &&
                    tag.getAlbum().equalsIgnoreCase(albumName))
                  foundTracks.add(afd);
            else {
              if(albumName == null || albumName.equalsIgnoreCase(FILTER_ALL)) {
                if (tag.getGenreName().equalsIgnoreCase(genreName) &&
                    tag.getArtist().equalsIgnoreCase(artistName))
                  foundTracks.add(afd);
              else {
                if (tag.getGenreName().equalsIgnoreCase(genreName) &&
                    tag.getArtist().equalsIgnoreCase(artistName) &&
                    tag.getAlbum().equalsIgnoreCase(albumName))
                  foundTracks.add(afd);
        foundTracks.sort();
        return foundTracks;
       * list all artists in this model
       * @return SortListModel
      public SortListModel listArtists() {
        SortListModel artists = new SortListModel();
        artists.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String artistName = tag.getArtist();
          if (artists.indexOf(artistName) < 0) {
            artists.add(artistName);
        artists.sort();
        return artists;
       * list all artists in this model having titles belonging to a given genre
       * @param genreName String  name of the genre artists are searched for
       * @return SortListModel
      public SortListModel listArtists(String genreName) {
        SortListModel artists = new SortListModel();
        artists.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String artistName = tag.getArtist();
          String genre = tag.getGenreName();
          if (artists.indexOf(artistName) < 0 && genre.equalsIgnoreCase(genreName)) {
            artists.add(artistName);
        artists.sort();
        return artists;
       * list all genres in this model
       * @return SortListModel
      public SortListModel listGenres() {
        SortListModel genres = new SortListModel();
        genres.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String genreName = tag.getGenreName();
          if (genres.indexOf(genreName) < 0) {
            genres.add(genreName);
        genres.sort();
        return genres;
       * list all albums in this model
       * @return SortListModel
      public SortListModel listAlbums() {
        SortListModel albums = new SortListModel();
        albums.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String albumName = tag.getAlbum();
          if (albums.indexOf(albumName) < 0) {
            albums.add(albumName);
        albums.sort();
        return albums;
       * list all albums in this model having titles belonging to a given genre
       * @param genreName String  name of the genre albums are searched for
       * @return SortListModel
      public SortListModel listAlbums(String genreName) {
        SortListModel albums = new SortListModel();
        albums.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String albumName = tag.getAlbum();
          String genre = tag.getGenreName();
          if (albums.indexOf(albumName) < 0 && genre.equalsIgnoreCase(genreName)) {
            albums.add(albumName);
        albums.sort();
        return albums;
       * list all albums in this model having titles belonging to a given genre and artist
       * @param genreName String  name of the genre albums are searched for
       * @param artistName String  name of the artist albums are searched for
       * @return SortListModel
      public SortListModel listAlbums(String genreName, String artistName) {
        SortListModel albums = new SortListModel();
        albums.add(FILTER_ALL);
        Iterator e = data.iterator();
        while (e.hasNext()) {
          ID3v11Tag tag = ((AudioFileDescriptor) e.next()).getID3v11Tag();
          String albumName = tag.getAlbum();
          String genre = tag.getGenreName();
          String artist = tag.getArtist();
          if(genreName == null || genreName.equalsIgnoreCase(FILTER_ALL)) {
            if (albums.indexOf(albumName) < 0 &&
                artist.equalsIgnoreCase(artistName))
              albums.add(albumName);
          else {
            if (albums.indexOf(albumName) < 0 &&
                genre.equalsIgnoreCase(genreName) &&
                artist.equalsIgnoreCase(artistName))
              albums.add(albumName);
        albums.sort();
        return albums;
       * get the number of audio tracks stored in this data model
       * @return int  the number of tracks
      public int getTrackCount() {
        return data.size();
      /** constant to select all items of a given part */
      public static final String FILTER_ALL = "    all";
    }...and here the changed CollectionThread now caching found File objects in a vector
    * Light Development Playlist Editor
    * Copyright (C) 2004 Ulrich Hilger
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * as published by the Free Software Foundation; either version 2
    * of the License, or (at your option) any later version.
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    package com.lightdev.app.playlisteditor.data;
    import com.lightdev.lib.util.InfoThread;
    import java.io.File;
    import java.util.Vector;
    import java.util.Enumeration;
    * A class to collect audio data from a given storage location.
    * <p>
    * <code>CollectionThread</code> uses ID3 tag information to gain data.
    * </p>
    * <p>See <a href="http://www.id3.org">http://www.id3.org</a> for details about
    * ID3 tags.</p>
    * @author Ulrich Hilger
    * @author Light Development
    * @author <a href="http://www.lightdev.com">http://www.lightdev.com</a>
    * @author <a href="mailto:[email protected]">[email protected]</a>
    * @author published under the terms and conditions of the
    *      GNU General Public License,
    *      for details see file gpl.txt in the distribution
    *      package of this software as well as any licensing notes
    *      inside this documentation
    * @version 1, October 13, 2004
    public class CollectionThread extends InfoThread {
       * constructor
       * @param model  AudioDataModel  the data model to collect data to
      public CollectionThread(AudioDataModel model) {
        this.model = model;
       * constructor, creates a new empty AudioDataModel
      public CollectionThread() {
        this(new AudioDataModel());
       * set the data model to collect data to
       * @param model AudioDataModel  the model to collect data to
      public void setModel(AudioDataModel model) {
        this.model = model;
       * get the data model associated to this thread
       * @return AudioDataModel  the data model
      public AudioDataModel getModel() {
        return model;
       * set the directory to collect data from
       * @param rootDir File  the directory to collect data from
      public void setRootDirectory(File rootDir) {
        this.rootDir = rootDir;
       * this is the method to prepare a thread to run.
      protected void prepareThread() {
        maxValue = -1;
        filesProcessed = 0;
        innerCount = 0;
        fileList = new Vector();
       * do the actual work of this thread, i.e. iterate through a given directory
       * structure and collect audio data
       * @return boolean  true, if work is left
      protected boolean work() {
        boolean workIsLeft = true;
        if(getStatus() < STATUS_HALT_PENDING) {
          countElements(rootDir.listFiles());
        if(getStatus() < STATUS_HALT_PENDING) {
          workIsLeft = collect(); //collect(rootDir.listFiles());
          fileList.clear();
          fileList = null;
        return workIsLeft;
       * count the elements in a given file array including its subdirectories
       * @param files File[]
      private void countElements(File[] files) {
        int i = 0;
        while (i < files.length && getStatus() < STATUS_HALT_PENDING) {
          File file = files;
    if (file.isDirectory()) {
    countElements(file.listFiles());
    else {
    fileList.add(file);
    i++;
    maxValue++;
    * read data into model
    * @param files File[] the file array representing the content of a given directory
    * @return boolean true, if work is left
    private boolean collect(/*File[] files*/) {
    Enumeration files = fileList.elements();
    while(files.hasMoreElements() && getStatus() < STATUS_HALT_PENDING) {
    File file = (File) files.nextElement();
    try {
    model.addTrack(file);
    catch(Exception e) {
    fireThreadException(e);
    filesProcessed++;
    if(++innerCount > 99) {
    innerCount = 0;
    fireThreadProgress(filesProcessed);
    return false;
    int i = 0;
    while(i < files.length && getStatus() < STATUS_HALT_PENDING) {
    File file = files[i];
    if(file.isDirectory()) {
    collect(file.listFiles());
    else if(file.getName().toLowerCase().endsWith("mp3")) {
    try {
    model.addTrack(file);
    catch(Exception e) {
    fireThreadException(e);
    i++;
    filesProcessed++;
    fireThreadProgress(filesProcessed);
    return (i<files.length);
    /** the directory to collect data from */
    private File rootDir;
    /** the data model to collect data to */
    private AudioDataModel model;
    /** the number of files this thread processed so far while it is running */
    private long filesProcessed = 0;
    /** a list to temporary store found files */
    private Vector fileList;
    /** counter to determine when to fire progress messages */
    private int innerCount = 0;

  • Pls help in performance tuning SQL

    Hi All,
    Can someone please help me to tune this quesry. Rt now it is takin 20 mins tro retuns 80,000 rows and its using dblink
    SELECT COUNT(*) FROM
    (SELECT /*+driving_site(main)*/CORP_ACTG_PRD_YEAR,
    CORP_ACTG_PRD_NBR,
    FCN_CODE,
    LOCAL_CRNC_CODE,
    GL_LOCAL_AMT,
    CORP_ID,
    PGRD_COST_CTR_ID,
    MAJOR_CODE,
    EXP_MINOR_CODE,
    PGRD_EXP_CODE,
    PGRD_EXP_DESC,
    DIV_CODE,
    MKT_CODE,
    PROD_CODE,
    PGRD_PROJECT_CODE,
    PGRD_PROJ_SHORT_DESC
    FROM --#GifDBLink# main,
    [email protected] main,
    select actg_prd_year, actg_prd_nbr from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84
    union
    select decode(actg_prd_nbr,1,actg_prd_year-1,actg_prd_year) actg_prd_year,
    decode(actg_prd_nbr,1,12,actg_prd_nbr-1) actg_prd_nbr
    from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84
    union
    select decode(actg_prd_nbr,12,actg_prd_year+1,actg_prd_year) actg_prd_year,
    decode(actg_prd_nbr,12,1,actg_prd_nbr+1) actg_prd_nbr
    from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84 ) minor
    where main.CORP_ACTG_PRD_YEAR = minor.actg_prd_year
    and main.CORP_ACTG_PRD_NBR = minor.actg_prd_nbr) T;

    user13365939 wrote:
    anyone?Incorrect.
    You are only one who can provide the information that was requested in this thread.
    Please see the FAQ, read the instructions and provide the necessary information.
    Re: 3. How to  improve the performance of my query? / My query is running slow.

  • Help - slowing/performance issues

    I've been using imovie with no problems until just recently my little 10 minute movie won't play back properly from the timeline. It looks like it's in slow motion & rebooting my computer doesn't help. Also, when I choose 'extract audio' from a clip, it randomly won't work.
    This 'slowing' issue seems to be affecting other programs involving video playback, such as quicktime.
    Any suggestions on how to fix these issues??
    Thanks!!!

    Turn off FileVault:
    http://docs.info.apple.com/article.html?artnum=93460
    If that didn't help, try everything here:
    http://danslagle.dvmix.com/mac/OSX/panther.shtml
    and here:
    http://danslagle.dvmix.com/mac/iMovie/iMovie3FixesIssues.shtml
    http://danslagle.dvmix.com/mac/iMovie/iMovie4FixesIssues.shtml
    http://danslagle.dvmix.com/mac/iMovie/iMovie5FixesIssues.shtml

  • Help with performance issues

    Hi peep, looking for some pointers on performance after installing a fresh copy of 7 starter. Have upgraded RAM to 2Gig but still booting takes 15 mins. Running the machine is incredibly slow. I have an S10-3 model with an intel atom, which i dont expect to be a power house but surely it should be useable. Any help would be great thanks.

    Hello
    I would suggest you start looking at the startrup programs and deselect some of them which you think you may not need during boot times.
    Cheers and regards,
    • » νιנαソѕαяα∂нι ѕαмανє∂αм ™ « •
    ●๋•کáŕádhí'ک díáŕý ツ
    I am a volunteer here. I don't work for Lenovo

  • Help with Performance issue with a view

    Hi
    We developed a custom view to get the data from gl_je_lines table with source as Payables. We are bringing the data for the last year and current year till date ie., from 01-JAN-2012 to SYSDATE. This view is in a package body, which is called from a concurrent program to write the data to a outbound file.
    The problem I am facing is that this view is fetching around 72 lakhs of records for the above date range and the program is running for a long time and completes abruptly with out any result. Can anyone please let me know if there is an alternative to this. I checked the view query and there seems to be not much scope to improve the performance.
    Will inserting al this data into a Global Temporary Table will help? Please revert at the earliest as this solution is very urgent for our clients.
    Message was edited by: 988490e8-2268-414d-b867-9d9a911c0053

    This is the view query:
    select GCC.SEGMENT1 "EMPRESA",
           GCC.SEGMENT2 "CCUSTO",
           GCC.SEGMENT3 "CONTA",
           GCC.SEGMENT4 "PRODUTO",
           GCC.SEGMENT5 "SERVICO",
           GCC.SEGMENT6 "CANAL",
           GCC.SEGMENT7 "PROJECT",
           GCC.SEGMENT8 "FORWARD1",
           GCC.SEGMENT9 "FORWARD2",
           FFVT.DESCRIPTION "CONTA_DESCR",
           ltrim(substr(XRX_CONSOLIDATION_MAPPING('XDMO_LOCAL_USGAAP_LEGAL_ENTITY',
                                                  'XDMO_REPORT_USGAAP_LEGAL_COMPANY',
                                                  GCC.SEGMENT1,
                                                  GCC.SEGMENT3),
                        1,
                        80)) "LEGAL_COMPANY",
           ltrim(substr(XRX_CONSOLIDATION_MAPPING('XDMO_LOCAL_USGAAP_ACCOUNT',
                                                  'XDMO_REPORT_USGAAP_FIN_ACCOUNT',
                                                  GCC.SEGMENT3,
                                                  GCC.SEGMENT3),
                        1,
                        80)) "GRA",
           ltrim(substr(XRX_CONSOLIDATION_MAPPING('XDMO_LOCAL_USGAAP_BUDGET_CENTER',
                                                  'XDMO_REPORT_USGAAP_RESPONSIBILITY',
                                                  GCC.SEGMENT2,
                                                  GCC.SEGMENT3),
                        1,
                        80)) "RESP",
           ltrim(substr(XRX_CONSOLIDATION_MAPPING('XDMO_LOCAL_USGAAP_PRODUCT',
                                                  'XDMO_REPORT_USGAAP_TEAM',
                                                  GCC.SEGMENT4,
                                                  GCC.SEGMENT3),
                        1,
                        80)) "TEAM",
           ltrim(substr(XRX_CONSOLIDATION_MAPPING('XDMO_LOCAL_USGAAP_ACCOUNT',
                                                  'XDMO_REPORT_USGAAP_FIN_ACCOUNT',
                                                  GCC.SEGMENT3,
                                                  GCC.SEGMENT3),
                        164,
                        80)) "GRA_DESCR",
           GJH.NAME "IDLANC",
           GJS.USER_JE_SOURCE_NAME "ORIGEM",
           GJC.USER_JE_CATEGORY_NAME "CATEGORIA",
           GJL.DESCRIPTION "DESCRICAO",
           decode(GJH.JE_SOURCE, 'Payables', GJL.REFERENCE_2, '') "INVOICE_ID",
           decode(GJH.JE_SOURCE, 'Payables', GJL.REFERENCE_5, '') "NOTA",
           decode(GJH.JE_SOURCE, 'Payables', GJL.REFERENCE_1, '') "FORNECEDOR",
           GJH.DEFAULT_EFFECTIVE_DATE "DTEFET",
           to_char(GJB.POSTED_DATE, 'DD-MON-YYYY HH24:MI:SS') "DTPOSTED",
           GJH.CURRENCY_CONVERSION_TYPE "TPTAX",
           substr(GCC.SEGMENT9, 8, 1) "TAXA",
           GJH.CURRENCY_CONVERSION_DATE "DTCONV",
           -- nvl(GJL.ACCOUNTED_DR,0)-nvl(GJL.ACCOUNTED_CR,0)       "VALOR",
           -- added as per ITT #517830
           nvl(GJL.ENTERED_DR, 0) - nvl(GJL.ENTERED_CR, 0) "VALOR",
           GJH.CURRENCY_CODE "MOEDA",
           --  decode(gcc.segment9, '00000000', 0, '00000001', nvl(GJL.ACCOUNTED_DR,0)-nvl(GJL.ACCOUNTED_CR,0)) "VALOR_FUNCIONAL",
           -- added as per ITT #517830
           (nvl(GJL.ACCOUNTED_DR, 0) - nvl(GJL.ACCOUNTED_CR, 0)) "VALOR_FUNCIONAL",
           GSOB.CURRENCY_CODE "FUNCIONAL",
           GJH.PERIOD_NAME "PERIODO",
           GJB.STATUS "STATUS",
           GSOB.SHORT_NAME "LIVRO",
           GJL.LAST_UPDATE_DATE "JL_LAST_UPDATE_DATE",
           GJH.LAST_UPDATE_DATE "JH_LAST_UPDATE_DATE",
           GJB.LAST_UPDATE_DATE "JB_LAST_UPDATE_DATE",
           GJL.JE_HEADER_ID "JE_HEADER_ID",
           GJL.JE_LINE_NUM "JE_LINE_NUM"
      from GL.GL_JE_LINES   GJL,
           GL.GL_JE_HEADERS GJH,
           GL.GL_JE_BATCHES GJB,
           --GL.GL_SETS_OF_BOOKS                    GSOB, ---As GL_SETS_OF_BOOKS table dropped in R12 so replaced with GL_LEDGERS table,Commented as part of DMO R12 Upgrade-RFC#411290.
           GL.GL_LEDGERS               GSOB, ---Added as part of DMO R12 Upgrade-RFC#411290.
           GL.GL_JE_SOURCES_TL         GJS,
           GL.GL_JE_CATEGORIES_TL      GJC,
           GL.GL_CODE_COMBINATIONS     GCC,
           APPLSYS.FND_FLEX_VALUES_TL  FFVT,
           APPLSYS.FND_FLEX_VALUES     FFV,
           APPLSYS.FND_FLEX_VALUE_SETS FFVS
    where GJL.CODE_COMBINATION_ID = GCC.CODE_COMBINATION_ID
       and GJL.JE_HEADER_ID = GJH.JE_HEADER_ID
       and GJH.JE_BATCH_ID = GJB.JE_BATCH_ID
          --and GJB.SET_OF_BOOKS_ID = GSOB.SET_OF_BOOKS_ID    ---Changing the mappings between the tables GL_JE_HEADERS and GL_JE_BATCHES As column SET_OF_BOOKS_ID of table GL_JE_BATCHES dropped in R12,Commented as part of DMO R12 Upgrade-RFC#411290.
       and GJH.LEDGER_ID = GSOB.LEDGER_ID ---Added as part of DMO R12 Upgrade-RFC#411290.
       and GJH.JE_SOURCE = GJS.JE_SOURCE_NAME
       and GJH.JE_CATEGORY = GJC.JE_CATEGORY_NAME
       and GCC.SEGMENT3 = FFV.FLEX_VALUE
       and FFV.FLEX_VALUE_ID = FFVT.FLEX_VALUE_ID
       and FFV.FLEX_VALUE_SET_ID = FFVS.FLEX_VALUE_SET_ID
       and FFVS.FLEX_VALUE_SET_NAME = 'XDMO_LOCAL_USGAAP_ACCOUNT'
       and GSOB.SHORT_NAME in ('XBRA BRL LOCAL GAAP', 'XBRA BRL USGAAP')
       and gcc.chart_of_accounts_id = gsob.chart_of_accounts_id
       and gjh.actual_flag = 'A'
    DB VErsion: 11.2.0.3.0
    The problem I am facing is that the above query fetches huge data and I want to know if there is anyway to improve the performance of this query. You are right that view is stored in DB. I am using this view query in a cursor to fetch the records

  • Asking help for performance issues about concurrent package

    One of my friends is developing a service based on resin. They use thread pool of current package in jdk1.5. The service will create a lot of threads in the thread pool. And most of the threads are waiting. What they can not make sure is how the large amount of waiting threads will affect the performance. These threads surely will occupy a lot of memory. But how will they affect the cpu?
    Some documents on the Internet say that the large amount of waiting threads will largely increase the thread switching overhead. And some others say no because the scheduler will not be affected by waiting threads. I'm not sure which one is true. Would anyone like to give me some tips? It's better if you can point out any our documents about it.
    Thanks!

    No, it just depends on Data Structures 101.
    You would have a list of ready threads, from which you would allocate one to the processor on some priority and fairness scheme, and another list of non-ready threads which you would only promote to the ready list when something happened to them that made them ready.
    And among the ready threads you would most likely use a priority queue, so that operations on it were O(log(N)). And if the ready list also included the unready list for some strange reason, operations on it would still be O(log(N)), i.e. less than linear in the total number of threads.
    And if for some strange reason it was implemented in a less efficient way than that, I would complain vociferously to the vendor. Scheduling has been going on for fifty years after all.

  • Performance issues with LOV bindings in 3-tier BC4J architecture

    We are running BC4J and JClient (Jdeveloper 9.0.3.4/9iAS 9.0.2) in a 3-tier architecture, and have problems with the performance.
    One of our problems are comboboxes with LOV bindings. The view objects that provides data for the LOV bindings contains simple queries from tables with only 4-10 rows, and there are no view links or entity objects to these views.
    To create the LOV binding and to set the model for the combobox takes about 1 second for each combobox.
    We have tried most of tips in http://otn.oracle.com/products/jdev/tips/muench/jclientperf/index.html, but they do not seem to help on our problem.
    The performance is OK (if not great) when the same code is running as 2-tier.
    Does anyone have any good suggestions?

    I can recommend that you look at the following two bugs in Metalink: Bug 2640945 and Bug 3621502
    They are related to the disabling of the TCP socket-level acknowledgement which slows down remote communications for EJB components using ORMI (the protocol used by Oracle OC4J) to communicate between remote EJB client and server.
    A BC4J Application Module deployed as an EJB suffers this same network latency penalty due to the TCP acknowledgement.
    A customer sent me information (that you'll see there as a part of Bug# 3621502) like this on a related issue:
    We found our application runs very slow in 3-Tier mode (JClient, BC4J deployed
    as EJB Session Bean on 9iAS server 9.0.2 enterprise edition). We spent a lot
    of time to tune up our codes but that helped very little. Eventually, we found
    the problem seemed to happen on TCP level. There is a 200ms delay in TCP
    level. After we read some documents about Nagle Algorithm,  we disabled a
    registry key (TcpDelAckTicks) in windows2000  on both client and server. This
    makes our program a lot faster.
    Anyway, we think we should provide our clients a better solution other than
    changing windows registry for them, for example, there may be a way to disable
    that Nagle's algorithm through java.net.Socket.setTcpNoDelay(true), in BC4J,
    or anywhere in our codes. We have not figured out yet.
    Bug 2640945 was fixed in Oracle Application Server 10g (v9.0.4) and it now disables this TCP Acknowledgement on the server side in that release. In the BugDB, I see backport patches available for earlier 9.0.3 and 9.0.2 releases of IAS as well.
    Bug 3621502 is requesting that that same disabling also be performed on the client side by the ORMI code. I have received a test patch from development to try out, but haven't had the chance yet.
    The customer's workaround in the interim was to disable this TCP Acknowledgement at the OS level by modifying a Windows registry setting as noted above.
    See Also http://support.microsoft.com/default.aspx?kbid=328890
    "New registry entry for controlling the TCP Acknowledgment (ACK) behavior in Windows XP and in Windows Server 2003" which documents that the registry entry to change disable this acknowledgement has a different name in Windows XP and Windows 2003.
    Hope this info helps. It would be useful to hear back from you on whether this helps your performance issue.

  • Cannot upload my profile pic in orkut ,but can through IE.pls help.

    i a unable to upload the profole pic in orkut when using mozilla 3.6.3 , but does not have any such prob when using firefox 3.0.19 or IE. Pls help on this issue ASAP.
    == This happened ==
    Every time Firefox opened

    Is that upload done via a regular Browse button like for attachments on the forum or via a Java applet?
    If the latter is the case then make sure that Java is installed and working.
    See [[Java]]
    http://www.java.com/en/download/help/testvm.xml - How do I test whether Java is working on my computer? - 1.4.2_xx, 1.5.0, 6.0
    http://www.java.com/en/download/installed.jsp - Verify Java Version

  • APXPAWKB form has performance issues

    Hi All,
    Am running Oracle EBS release 12.0.4 running on HP-UX Itanium 11i.
    Of late, whenever users try and pay an invoice,using the APXPAWKB, it either takes ages to save that
    single transaction or the form completely hangs.
    I tried re-generating the form but to no help.
    Kindly assist as its end month so salaries cant be paid.
    Thanks in advance.
    Rajab.

    Hi;
    Am running Oracle EBS release 12.0.4 running on HP-UX Itanium 11i.
    Of late, whenever users try and pay an invoice,using the APXPAWKB, it either takes ages to save that
    single transaction or the form completely hangs.Wiht hang you mean? You get any error or screen froze?
    Please follow below and see its helpful:
    AUTOSELECT PERFORMANCE ISSUE IN RELEASE 11 [ID 1070374.6]
    R12: Application Hangs when Finding Invoices in Enter/Adjust Invoices [ID 749757.1]
    PMT:PAYMENT BATCH HANGS IN PENDING, STANDBY STATUS WHEN TRYING TO CONFIRM [ID 1017339.102]
    CONFIRM PAYMENT BATCH HANGS [ID 1051730.6]
    R12: Void Payment With Invoice Workbench Open Causes Application Hang [ID 436529.1]
    Regard
    Helios

  • EP6 sp12 Performance Issue, Need help to improve performance

    We have a Portal development environment with EP6.0 sp12.
    What we are experiencing is performance issue, It's not extremely slow, but slow compared to normal ( compared to our prod box). For example, after putting the username and password and clicking the <Log on> Button it's taking more than 10 secs for the first home page to appear. Also currently we have hooked the Portal with 3 xAPPS system and one BW system. The time taken for a BW query to appear ( with selection screen) is also more than 10 secs. However access to one other xAPPS is comparatively faster.
    Do we have a simple to use guide( Not a very elaborate one) with step by step guidance to immediately improve the performance of the Portal.
    Simple guide, easy to implement,  with immediate effect is what we are looking for in the short term
    Thanks
    Arunabha

    Hi Eric,
      I have searched but didn't find the Portal Tuning and Optimization Guide as you have suggested, Can you help to find this.
    Subrato,
      This is good and I would obviously read through this, The issue here is this is only for Network.
      But do you know any other guide, which as very basic ( may be 10 steps) and show step by step the process, it would be very helpful. I already have some information from the thread Portal Performance - page loads slow, client cache reset/cleared too often
    But really looking for answer ( steps to do it quickly and effectively) instead of list of various guides.
    It would be very helpful if you or anybody( who has actually done some performance tuning) can send  a basic list of steps that I can do immediately, instead of reading through these large guides.
    I know I am looking for a shortcut, but this is the need of the hour.
    Thanks
    Arun

  • Performance issue on query. Help needed.

    This is mainly a performance issue. I hope someone can help me on this.
    Basically I have four tables Master (150000 records), Child1 (100000+ records), Child2 (50 million records !), Child 3 (10000+ records)
    (please pardon the aliases).
    Now every record in master has more than one corresponding record in each of the child tables (one to many).
    Also there may not be any record in any or all of the tables for a particular master record.
    Now, I need to fetch the max of last_updated_date for every master record in each of the 3 child tables and then find the maximum of
    the three last_active_dates obtained from the 3 tables.
    eg: for Master ID 100, I need to query Child1 for all the records of Master ID 100 and get the max last_updated_date.
    Same for the other 2 tables and then get the maximum of these three values.
    (I also need to take care of cases where no record may be found in a child table for a Master ID)
    Writing a procedure that uses cursors that fetches the value from each of the child table hits performance
    badly. And thing is I need to find out the last_updated_date for every Master record (all 150000 of them). It'll probably take days to do this.
    SELECT MAX (C1.LAST_UPDATED_DATE)
    ,MAX (C2.LAST_UPDATED_DATE)
    ,MAX (C3.LAST_UPDATED_DATE)
    FROM CHILD1 C1
    ,CHILD2 C2
    ,CHILD3 C3
    WHERE C1.MASTER_ID = 100
    OR C2.MASTER_ID = 100
    OR C3.MASTER_ID = 100
    I tried the above but I got a temp tablespace error. I don't think the query is good enough at all.
    (The OR clause is to take care of no records in any child table. If there's an AND, then the join and hence select will
    fail even if there is no record in one child table but valid values in the other 2 tables).
    Thanks a lot.
    Edited by: user773489 on Dec 16, 2008 11:49 AM

    Not sure I understand the problem. The max you are getting from the above is already the greatest out of the three - that's why we do the UNION ALL.
    Here's sample code without output, maybe this will clear it up:
    with a as (
    select 10 MASTER_ID, to_date('12/15/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
    select 20 MASTER_ID, to_date('12/01/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
    select 30 MASTER_ID, to_date('12/02/2008', 'MM/DD/YYYY') LAST_DTE from dual
    b as (
    select 10 MASTER_ID, to_date('12/14/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
    select 20 MASTER_ID, to_date('12/02/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
    select 40 MASTER_ID, to_date('11/15/2008', 'MM/DD/YYYY') LAST_DTE from dual
    c as (
    select 10 MASTER_ID, to_date('12/07/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
    select 30 MASTER_ID, to_date('11/29/2008', 'MM/DD/YYYY') LAST_DTE from dual UNION ALL
    select 40 MASTER_ID, to_date('12/13/2008', 'MM/DD/YYYY') LAST_DTE from dual
    select MASTER_ID, MAX(LAST_DTE)
    FROM
    (select MASTER_ID, LAST_DTE from a UNION ALL
    select MASTER_ID, LAST_DTE from b UNION ALL
    select MASTER_ID, LAST_DTE from c)
    group by MASTER_ID;
    MASTER_ID              MAX(LAST_DTE)            
    30                     02-DEC-08                
    40                     13-DEC-08                
    20                     02-DEC-08                
    10                     15-DEC-08                
    4 rows selectedEdited by: tk-7381344 on Dec 16, 2008 12:38 PM

  • HT4623 having issues with activating my iPhone 3gs after upgrading to ios6. Tried activating via itunes but no respite " says No sim inserted". pls help.

    Guys, I just upgraded my iphone 3gs to ios6, it took 2 hours get it installed. However asfter installing there are issues with activating it.
    Its getting failed every time..."says the activation server is temporarily unavailable".
    Tried activating via itunes but no respite " says No sim inserted".
    pls help.

    No, I did not find a way to fix it.  Went to Apple store to be told that the phone is dead and I would need to purchase a new phone.  A little frustrated with the fact that it is Apple who caused the phone to not work!

Maybe you are looking for

  • * Urgent FND_REQUEST.SUBMIT_REQUEST *

    Hi Gurus, I am having a problem in Oracle apps. I am calling the following function and running a shell script which has been registered in apps as "CPSINTA" and working fine if I run it using concorrent program. I need to run this from forms and I w

  • Attach movie clip + INVISIBLE

    hey, is there a way to attach a movie clip and make the object INVISIBLE (i.e. make the object's alpha 0 as it is attached). here's the line of code to attach the clip: holder.attachMovie("frame1", "frame1_mc", 20, {_x: 30, _y: 35}); -donkeyboy

  • Upgrade Lab with Oracle Linux 5.4 installed to Oracle Linux 6.3

    Dear Experts, I hope to upgrade a lab of 30 PC have got OEL 5.4 installed, to have OEL 6.3 What is the fastest (automated) installation method to accomplish that. Best Regards Mahmoud Rabie

  • Hp pavilion g6 notebook graphics upgrade

    Hi, I was just wondering if it is possible to uprade my graphics card. I have the hp pavilion g6 notebook  with amd E2-3000m apu amd radeon hd 6380g graphics This question was solved. View Solution.

  • Processing raw photo's

    I am new to aperture and recently shot my nieces wedding in raw. I have edited the photo's but cant figure out how to convert the edited raw versions to jpeg for further use. Can I do them all as a batch or do they have to be done individually? I rec