How to improve the process of collecting stats

Hello

We have every day to collect the stats of five patterns but it last 6-7 hours

We use the following command to do this

exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODBATCH', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODMASTER', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODMCT', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODCMS', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname = > 'FFPREPRODUSER', estimate_percent = > DBMS_STATS.) AUTO_SAMPLE_SIZE);

last schema was taking more time about 5 hours.

Please tell me how I can improve the speed.

Thank you.

user12009184 wrote:
Hello

We have every day to collect the stats of five patterns but it last 6-7 hours

We use the following command to do this

exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODBATCH', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODMASTER', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODMCT', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODCMS', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);
exec DBMS_STATS. GATHER_SCHEMA_STATS (ownname => 'FFPREPRODUSER', estimate_percent => DBMS_STATS. AUTO_SAMPLE_SIZE);

last schema was taking more time about 5 hours.

Please tell me how I can improve the speed.

Thank you.

SQL performance with dbms_stats, read below
http://www.DBA-Oracle.com/art_builder_dbms_stats.htm

Tags: Database

Similar Questions

  • Satellite A300-1PH - how to improve the battery life

    I want to get an extended battery...
    How to improve the battery life?
    I have the Satellite A300-1PH.

    Hello

    You want to extend the battery work in order to use the laptop longer with the battery power?

    Well, in order to extend the battery work, you should check the Vista power settings.
    Here, you can assign some settings like brightness etc. who would save the energy of the battery of the screen.

    For more details, see this document how:
    + How to manage Windows Vista power management features? +
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=41

    If you want to know wow to get the most out of the battery, consult this FAQ from Toshiba:
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=20

    See you soon

  • How to improve the rendering time on MacBook Air

    Hi all

    Processor: Intel Core i7-4650U @ 1.70 GHz, 2.30 GHz
    Installed memory (RAM live): 8.00 GB
    System type: 64-bit, x 64 processor operating system
    Operating system: 8.1 Enterprise, 64-bit Windows (boot to the Windows partition with bootcamp, work is not as a virtual machine)

    Any ideas how to improve the rendering performance of a YouTube video that I created. I realize that the rendering is not ideal on a MacBook Air, however, there are free of RAM and CPU capacity according to the directives of the screenshot:

    Adobe Media Encoder v2.png

    For example, I put that he should leave 1.5 GB of RAM for other programs, but there are still 3 GB free.

    (FYI at 01:24 popped it up to 100% of the CPU)

    Any help much appreciated.

    Kind regards

    Ben

    This isn't a very powerful machine.  It is probably not much to do.

  • How to improve the performance of the import

    I'm converting a database of its current WE8ISO88591 character set AL32UTF8
    I use NLS_LENGTH_SEMANTICS to TANK so I don't have to increase the length of the column.

    I followed the instructions in the Oracle:
    144808.1
    313175.1

    Except import that takes too long.

    I took a full database export WE8ISO8859p1 and now its importation in AL32UTF8.

    It is always difficult to prove slow source; but I think it has to do something with NLS_LENGTH_SEMANTICS. On the same
    Server; If the new database was in WE8ISO8859P1, a 5 million row table import took 2 hours; but in Al32UTF8 with NLS_LENGTH_SEMANTICS it takes 1 day!

    No idea how to improve the performance of the import.

    DOUBLE WIRE!

    Please, don't post duplicate discussions.

    Mark this thread ANSWER and continue to use your original thread where you are already helped.

    You have NOT given the info that has been ask in your other thread.
    Re: NLS_LENGTH_SEMANTICS = CHAR import is too slow

  • How to improve the resolution of the image with the help of filters

    How to improve the resolution of the image with the help of filters?

    resolution of the image, please check the links below. They should give you a clear idea about the resizing and resampling of images.

    http://helpx.Adobe.com/Photoshop/KB/Advanced-cropping-resizing-resampling-Photoshop.html#m ain_Resizing_and_resampling_images

    Understanding vs Resample resize | Learn Photoshop CS6 | Adobe TV

    See you soon!

    ~ David

  • How to automate the process of loading data using load file & Task Scheduler

    Hello

    I do the automated processes to load the data into Hyperion Planning application using the file data_Load.bat & Scheduler of tasks.

    I created Data_Load.bat file, but the rest of the process, I cannot complete.

    Could help you me, how to automate the process of loading data using the file Data_load.bat & task Scheduler or what are the rest of the file is require it to achieve.

    Thank you

    In response to your question using the maxl for loading scripts?

    If Yes, I've seen and deliver in the batch (ex: load_data.bat) that is you do not have the path of the maxl script complete with a batch when passing through the event the task scheduler will work, but the log file and / or error will not be created. Which means lots claims it linked task scheduler, although he did not do what you need to.

    If you use maxl use this as the batch

    "essmsh C:\data\DataLoad.mxl" or you can also use the full path for the maxl or work elsewhere. The only reason why I think that the maxl can then not work is if you do not have the updated batch updated to call on all LANE changes maxl or if you need to update your environment variables to correct the command essmsh to work in a command prompt.

  • How to store the output of a statement select * statement in a file?

    How to store the output of a statement select * / statement of dsc in a file?

    As user sys:

    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    /
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /
    

    As myuser:

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      --
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    

    This allows the header line and the data to write into files separate if necessary.

    for example

    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    
    PL/SQL procedure successfully completed.
    

    Output.txt file contains:

    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10
    

    The procedure allows for the header and the data to separate files if necessary. Just by specifying the file name "header" will put the header and the data in a single file.

  • How to implement the process Train in Jdev 10.1.3

    Hello..
    Anyone know where to find a tutorial on how to implement the process train in jdev 10.3.1

    Thank you

    http://download-West.Oracle.com/docs/HTML/B25947_01/web_complex005.htm#CEGIGJID

  • How to solve the "metric Errors Collection"?

    Hello

    Some targets were not working. I erased the blackout. These were then "_pending state_" for awhile. Now that the Oracle Application Server shows in a pending state and its objectives as OC4J, OC4J JVM, Oracle HTTP Server shows "_Metric Collection Errors_".

    So, how to solve the error?

    Thanks in advance.

    I assume you mean that you don't have access to the Agent log files? ;-)

    You can try to select the HTTP server in the tabs of all targets and press on [configure] and make sure that all of the eigenvalues are there and say [OK] to save the data.

    Concerning
    SoC

  • Satellite P300 - 19 p - how to improve the graphics for Microsoft FSX?

    Please could someone tell me if and how I can improve the graphics of my laptop when I run Microsoft FSX?
    Of course, I could buy a good laptop with a high-performance graphics card, but is it something I can do to improve the graphics?

    Thank you very much.

    Hi Ben

    First of all, I must say that Flight Simulator X needs a lot of graphics performance and this game is really high system requirements. You need a powerful CPU, graphics card and enough RAM.

    Regarding your question an update of the map for example graph it s is not possible. It s fixed/soldered on the motherboard and there is no Exchange possible on desktop.
    So if you want a laptop that is faster for games, you can buy a new one, like the Qosmio X 500.

    You can only improve performance if you reduce the resolution of the screen or the details of the game.
    Make sure also that if the last page Toshiba display driver is installed.

  • How to improve the performance of the Intel X 3100 on Satellite L300

    Hello everyone.

    First of all, I don't know if this is an appropriate place to post this thread here or no, but I would like to share with you the experience relating to the improvement of Intel X 3100 (GMA965).

    As we know, there is no driver is good for this chipset from Intel for the moment, especially on VIsta.
    This improvement is made by editing the registry of Intel driver.

    * Steps: *.
    * 1 * open run (Windows + R)
    * 2 * enter Regedit
    * 3 * open the subfolder: * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr ol\Video\ *.
    * 4 * from there you'll see lots of subfolders in video, open each one until you see the folder * 0000 * with + _3DMark03.exe +.
    (For example, my is {HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr ol\Video\ {B5990899-FBCB-45E1-B0B0 *} and reg DWord _3Dmark03.exe lies in two subfolders * 0000 * and * 0001 *})
    * 5 * in * 0000 * and * 0001 *, create two new * DWORD format: * _software.exe* and * ~ software.exe*, value = 1 (hexadecimal). Here, * software * represents the name of the program you want to accelerate as * _photoshop.exe* and * ~photoshop.exe*
    * 6 * in these files, search for * GFX_Options * and change its value to * 1 *.
    * 7 * restart your computer to activate GFX
    * 8 * repeat step 4 to add more programs you want

    Other updates for the drivers are under developed. However, this method will help you to speed up your computer performance with + heavy + graphical software required. I got double FPS on some software on my Toshiba L300 using this method such as Corel, WarcraftIII and Titan Quest (24-32 fps measurement by Fraps)

    Hope it's useful for everyone.
    Best wishes

    Hi Luong Phan

    Thanks a lot for the details and this great instruction.

    I also found this thread. It s your ;)

    + Improve the performance of Satellite L300 graphics software and games-Vista +.
    http://forums.computers.Toshiba-Europe.com/forums//message.jspa?MessageID=119890#119890

    It s the same statement. I am happy. Thank you

  • How to start the process of "NI_SystemState"?

    In my Distributed System Manager, I found NI_SystemState process on one of my systems of RT.

    I don't know when and how the process has started.

    The engineering Application of NI Tao li | [email protected] pointed out the result.

    The process is published by the RT himself system. I need install a server named "systemstate" RT target published.

    http://digital.NI.com/public.nsf/allkb/F1AB535F1BD7F1578625780700237A3D?OpenDocument

    http://digital.NI.com/public.nsf/allkb/F4D776187EFCC30986256EFC007FC922?OpenDocument

  • How to improve the performance of your computer and free up space.

    Original title: the unwanted temporary files of windows is at the origin of the problems of proformanace

    According to a check of problem: the unwanted files temporary windows could take to improve the performance of your computer and free up space.

    Can anyone help with this simple problem.

    Angelo

    Hi Angelo,.

    1. which edition of Windows are you running?
    Example: Windows 7 Professional 32 bit.
    Please follow the below link to clean unwanted temporary files.
    Delete files using disk cleanup
     
    Microsoft at home.
    Slow PC? Optimize your computer for peak performance
    Make slate: how to remove the unwanted files and programs
     
    I hope this helps.
  • How to increase the processing speed by connecting to another computer via USB - USB cable

    Share laptop processing power. Windows 8, Windows 7

    Hello

    I was wondering if I could increase my processing power by connecting a portable alternative to mine via a USB to usb cable. If anyone knows how I would go to do that, or if it is possible I would like to know. I searched on google but not found all the answers.
    If this can help, my laptop is running Windows 8 32-bit preview developer, and the portable alternative is running as Windows 7 Ultimate 32 bit.
    Any help would be greatly appreciated.
    Thank you very much
    Mike

    Hi MichaelSenior,

    You will not be able to increase the power of a computer processing by connecting it to another computer via a USB cable or by any other means.

    In order to increase the processing power of your computer I suggest you check with your computer manufacturer to see if you can pass any hardware on your computer.

    Example: Increase the size of the memory on your computer or upgrading the processor etc...

    Hope this information helps you.

  • Camcorder car bought in Asia, how to change the date/time United States?

    Hi, I bought the unit in Hong Kong and brought it to the United States.  After I've set the date and time, each time it starts, it is synhronize to the time and date in Asia, which is 15 hours ahead of time.  I tried to find it in the manual on how to change the region, but could not.  Is there a way I can do?  Pleaes help.  Very much appreciated.

    I found it under Satilliate synchronization, I had to press OK again to UTC is displayed.  Thank you very much for the help.

Maybe you are looking for