Time necessary to truncate the table

Hello

We use Oracle 9.2.0.8.
There is an array whose size is close to 30 GB.
Because there are no locks and just a string index into this table, is possible to estimate the time required to truncate this table?
I need to plan this activity. Is someone can give me an idea about the time based on past experiences?

Thanks in advance,
Iron

Hello

normally maximum a few minutes, depending on which is more go in the database.

Herald tiomela
http://htendam.WordPress.com

Tags: Database

Similar Questions

  • Index rebuild required after truncate the table and load data

    Hello


    I have a situation that we truncate tables bit and then we loaded data [only content] on these tables. What you need to rebuild the index online is necessary or not?


    And another question is if we drop a few clues is the total amount of space is released or not. And re-create indexes will use the same amount of space. As I don't have disk space more? In this situation, rebuild the index online will be a better idea...

    Can you please on this...


    truncate the table some the few loading tables + reconstruction markings online is the best (or) droping little tables, a few tables loading + re-create the index is better

    Can you suggest the best way... We have a time that it currently we don't have enough space on the disk... [Option should not effect the space]

    user13095767 wrote:
    Ok. I have it...

    u want to say if we disbale the index while loading... Next, we need to spend the time to build.

    If the indexes are enabled, then rebuild again is not necessary after loading tables...

    Please answer if my understanding is correct...

    above is correct

    >

    If so, how abt the differences in the space occupied by the spaces of storage during the index rebuild and re-create... T he acquires more space if recreate us [deletion and creation] or rebuild online is preferable to an index...?

    space used is the same for all options.

  • Data export of the Disqualification to the table in step should not truncate the table.

    Hello friends,

    Please find blow my requirement and do the necessary.

    We export data cleaned to staging tables, whenever we export data, Disqualification truncates the table and inserts the new data sets into this table.

    My requirement is instead of truncating the table before inserting the data in it, Disqualification must add these records, should not truncate the table.

    Please let me know how to configure this in OEDQ, your help is appreciated.

    Thank you, Prasad

    Could not be easier. Double-click the task to export in your work and change the mode append.

  • raise errors ora-01426 truncating the table

    Hello

    We have a process that runs in the following process for some tabls game
    1 disable constraints
    2. the truncating tables
    3. activation of the constraints

    but after treatment for 5 tables, truncating up error

    BEGIN < process name >; END;



    *

    ERROR on line 1:

    ORA-01426: digital overflow

    ORA-06512: at the "< procedurename >", line 33

    ORA-06512: at line 1


    This line 33 point to run immeidate ' truncate table < table name >

    Can I know what is the reason for throwing "digital overflow" error truncating the table...

    Thanks in advance

    user9080289 wrote:
    Thank you.

    Is my verision of oracle 11g

    Then, you could have the described bug. Follow the instructions how to bypass (flush with low-value stats monitoring) or apply the #8226471 patch.

    Nicolas.

  • How to truncate the table using SQLJ

    Here is a snippet of code SQLJ trying to truncate a table before filling with new records.

    However, while the class compiles fine, I get an error PLS-00103 on execution.

    Your expertise is very welcome and necessary for what seems like a simple problem, for which I can't find an answer.

    import java. IO;
    import java.sql. *;

    public class FadsDirListing
    {
    public static getContentsList (String directory) Sub throws SQLException
    {
    *#sql {FADS_DIR_CONTENTS TRUNCATE TABLE}; * - WHY NOT THIS STATEMENT?
    File [] files = new File (directory) .listFiles ();
    for (int i = 0; (file! = null) & & (I < files.length); (++ I)
    {
    File f = files;
    String filName = f.getName ();
    long filSize = f.length ();
    ModDate timestamp = new Timestamp (f.lastModified ());
    String filType = f.isDirectory ()? "D" : "F";

    {INSERT #sql
    IN FADS_DIR_CONTENTS (FILE_SIZE, TYPE_DE_FICHIER, FILE_NAME, LAST_MODIFIED)
    VALUES (: filName,: filSize,: filType,: ModDate)
    };
    #sql {COMMIT
    };
    }
    }
    }

    Thank you for your help - I appreciate it very much.

    Dave

    You must run a command DDL by NDS. If you wrap it in a PL/SQL block and use NDS to run it, it should work.


    BEGIN
    EXECUTE IMMEDIATE "DDL STATEMENT";
    END;

  • A question about the conservation of fields (hour, min, sec) time DATE type in the table on the changes of NLS_DATE_FORMAT

    Hello

    Oracle version: 12.1.0.1.0 - 64 bit

                      OS:   Fedora Core 17 X86_64

    My question is about the conservation of fields (hour, minute, second) time DATE type in the array on NLS_DATE_FORMAT changes.

    Take the following test case:

    SQL> create table tmptab(dateval date);
    
    Table created.
    
    SQL> alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
    
    Session altered.
    
    SQL> insert into tmptab(dateval) values('2014-01-01 00:00:00');
    
    1 row created.
    
    SQL> insert into tmptab(dateval) values('2014-01-01 10:00:00');
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from tmptab;
    
    DATEVAL
    -------------------
    2014-01-01 00:00:00
    2014-01-01 10:00:00
    
    SQL> alter session set nls_date_format = 'yyyy';
    
    Session altered.
    
    SQL> select * from tmptab where dateval > '2014';
    
    no rows selected
    
    SQL>
    

    I don't understand why it returns nothing. The second test case above insert statement inserted a line with 10 as the value for the time of the DATE field column dateval.

    Accordingly, while comparing this with the literal '2014' (which based on the new value of NLS_DATE_FORMAT = "yyyy" is implicitly converted to DATE), shouldn't the above query returns the line 2014-01-01 10:00 ?

    I mean, I changed the NLS_DATE_FORMAT but data from time in the table fields are preserved and that's why they should normally be taken into account in the comparison of date.

    What I'm trying to say is that for me (Please correct me if I'm wrong), no matter what NLS_DATE_FORMAT configuration is the following test

    SQL> select * from tmptab where dateval > '2014';
    

    is the same thing that

    SQL> select * from tmptab where dateval > to_date('2014-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss');
    

    And because the line 2014-01-01 10: 00:00 in the tmptab table. The following test

    2014-01-01 10:00:00 > to_date('2014-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
    

    evolves normally true (beucase of TIME = 10 on the left side of the test) and therefore this line must be returned which is not the case in the test above.

    You kindly could you tell me what I misunderstood?

    Thanks in advance,

    This is the price for the use of implicit conversions. Implicit DATE conversion rules are not as direct as it can be assumed. In your case, all you provide is year as date format. In this case date implicit conversion rules assumes that month in the current month, day 1 and time as 00:00:00.

    SQL > alter session set nls_date_format = "yyyy";

    Modified session.

    SQL > select to_char (to_date ('2014 "), ' mm/dd/yyyy hh24:mi:ss') twice;

    TO_CHAR (TO_DATE('20)
    -------------------
    01/08/2014-00:00:00

    SQL >

    So, when you start:

    Select * from tmptab where dateval > '2014 '.

    Oracle implicitly converts date using "YYYY", which translates as August 1, 2014 '2014'. That's why your quesry returns no rows.

    SY.

  • How to truncate the table in a pl/sql block

    Hello guys, I'm trying to truncate a table that includes data using a pl/sql block, so if the table has even a single row then the truncate should run. to do this, I wrote the following code


    declare
    number num.
    Start
    Select count (*) in the num from table_name;
    If num > 0 then
    truncate table table_name;
    end if;
    end;

    Now, when I execute the pl/sql block, I get the following error.

    PLS-00103: encountered the symbol "TABLE" when the expected in the following way:

    When I run the truncate without pl/sql command, it runs very well.

    Can someone please where I'm wrong.

    Thank you

    Published by: 969224 on April 23, 2013 08:08

    969224 wrote:
    Hello guys, I'm trying to truncate a table that includes data using a pl/sql block, so if the table has even a single row then the truncate should run. to do this, I wrote the following code

    declare
    number num.
    Start
    Select count (*) in the num from table_name;
    If num > 0 then
    truncate table table_name;
    end if;
    end;

    Now, when I execute the pl/sql block, I get the following error.

    PLS-00103: encountered the symbol "TABLE" when the expected in the following way:

    When I run the truncate without pl/sql command, it runs very well.

    Can someone please where I'm wrong.

    Thank you

    Published by: 969224 on April 23, 2013 08:08

    DDL is not allowed directly within PL/SQL procedures.

    You must (ab) use EXECUTE IMMEDIATE issuing the DDL

  • Need to truncate the table before loading new data

    I use sqlldr control file to load a flat file to a table. This file will be provided each month and is a complete replacement file. I need to automate the process to truncate the data already present in the table before loading new records. I can do this in the same ctl file as load or do I need a separate batch file?

    He is the current ctl file:

    DOWNLOAD THE DATA
    INFILE ' D:\DATA\OHNFILES\OHN_PROVIDER_DATA. TXT'
    INSERT
    PRESERVE SPACES
    IN THE WEB OF THE TABLE. OHN_OK_SELECT
    (
    Position of CHKPPO (0001:0003).
    Position of the EFFECTIVEDATE (0004:0011).
    Position of TERMDATE (0012:0019),.
    CRED_ID position (0020:0024).
    LASTNAME position (0025:0099),
    Position of FIRSTNAME (0100:0124),
    Position of MIDDLENAME (0125:0149),
    Position of PROFESSIONALDEGREE (0150:0164),
    Position of PRIMARYSPECIALTYID (0165:0214),
    Position of PRIMARYSUBSPECIALTYID (0215:0264),
    Position of SECONDARYSPECIALTY (0265:0314),
    Position of OKLICENSENO (0315:0329),
    Position of the Nordic Institute of patents (0330:0339),
    Position of TAXIDNO (0340:0348),
    Position of MEDICARENO (0349:0365),
    Position of OFFICEADDRESS (0366:0465),
    Position of BLDGSUITEPO_BOX (0466:0500),
    Position of the CITY (0501:0525),
    Position of the STATE (0526:0527),
    Position of code POSTAL (0528:0537),
    Position of TELEPHONE number (0538:0549),
    Position of FAX number (0550:0561),
    Position of EMAILADDRESS (0562:0611),
    Position of the COUNTY (0612:0631),
    BILLINGADDRESS position (0632:0731),
    BLDGSUITEPO_BOX1 position (0732:0766).
    Ville1 position (0767:0791).
    STATE1 position (0792:0793).
    POSTALCODE1 position (0794:0803).
    Telephone1 position (0804:0815).
    Position of telecopie1 (0816:0827),
    EMAILADDRESS1 position (0828:0877).
    MAILINGADDRESS position (0878:0977),
    BLDGSUITEPO_BOX2 position (0978:1012).
    CITY2 position (1013:1037),
    STATE2 position (1038:1039).
    POSTALCODE2 position (1040:1049).
    Telephone2 position (1050:1061).
    Telecopieur2 position (1062:1073).
    EMAILADDRESS2 position (1074:1123).
    Position of the OST (1124:1163),
    Position of CLINIC_GRPNAME (1164:1263),
    Position of FEESCHEDULEID (1264:1278),
    FILL position (1279:1400)
    )

    customer wrote:
    I use sqlldr control file to load a flat file to a table. This file will be provided each month and is a complete replacement file. I need to automate the process to truncate the data already present in the table before loading new records. I can do this in the same ctl file as load or do I need a separate batch file?

    Same file. Say "TRUNCATE" instead of "INSERT".

    LOAD DATA
    INFILE 'D:\DATA\OHNFILES\OHN_PROVIDER_DATA.TXT'
    TRUNCATE
    PRESERVE BLANKS
    INTO TABLE WEB.OHN_OK_SELECT
    ( ...
    

    Published by: Frank Kulash, on September 3, 2009 15:12

  • VMware infrastructure management - time necessary to do the job? Tips and advice needed please.

    guys / girls - some notice on the amount of work required to maintain and develop a VMware Infrastructure setup as follows:

    9 blades (BL 465 & 685) HP connected to an EVA 8000 (double fabric connected)

    Set up 2 separate HA /DRS Clusters running ESX 3.5 Update 3

    130 virtual machines, mainly under windows 2003 (backup VCB full every night)

    How many hours per week would you say, in your experience, should maintain, troubleshoot and develop (stay up to date with patches, etc.), critical infrastructure of this size in an enterprise environment with 2,500 users (IE if something goes wrong then there will be serious questions asked). The job would mean ensuring full availability etc. and a capacity of DR.

    Be as conservative as you like, duties include looking after the equipment, and (with HP support relevant contracts), could understand you short if possible reasoning. The turnover of virtual machines is about 2 per week.

    Hello

    last part of the puzzle is man how many hours per week would you must employ a person to perform the infrastructure once implemented. (ie. verification of backups, torubleshooting of performance issues, the provisioning maybe some new virtual machines per week, now patch levels and take care of the equipment, etc..)

    For this size environment, I would have a virtualization full-time administrator who works closely with your storage, network, server and application teams to solve problems. Almost everything from the beginning will be considered a problem of virtualization. You need a good plan on how to handle this. You will need a team made up of members of other teams to manage all possible problems.

    Again be as conservative as you want. I'll assign the points after this bit.

    I probably aim for at least 2 people for full redundancy. The work does not stop when you're on vacation.

    3-9 guests can be easily managed by a single person, but we're going to do a bit of math...

    150 VMS to start...

    Let's say you need to VMotion all 150 VMs... Say 30 seconds per VM, if 150 * 30 = 1.25 hours = average 2.5 hours of interruption, etc..

    Let's say you need to SVMotion all 150 VMs... 1 GB/s with an average 24 GB per VM so 3 working day in SVMotion tell everything... Closer to 1 week. Its a drive problem.

    Now add both to:

    Debugging problems of enforcement...

    Debugging problems of storage...

    Debugging network problems...

    Guest operating system problems debugging...

    Debugging problems ESX...

    Debugging performance issues...

    And the time to add:

    Reports required by management...

    Duration of training...

    New implementation time VM...

    Nerw material planning...

    DR testing and planning...

    etc etc.

    It is at least 1 person complete if not 2.

    Best regards

    Edward L. Haletky VMware communities user moderator, VMware vExpert 2009, url = http://www.virtualizationpractice.comvirtualization practical analyst [url]
    "Now available: url = http://www.astroarch.com/wiki/index.php/VMware_Virtual_Infrastructure_Security' VMware vSphere (TM) and Virtual Infrastructure Security: securing the virtual environment ' [url]
    Also available url = http://www.astroarch.com/wiki/index.php/VMWare_ESX_Server_in_the_Enterprise"VMWare ESX Server in the enterprise" [url]
    [url =http://www.astroarch.com/wiki/index.php/Blog_Roll] SearchVMware Pro [url] | URL = http://www.astroarch.com/blog Blue Gears [url] | URL = http://www.astroarch.com/wiki/index.php/Top_Virtualization_Security_Links Top security virtualization [url] links | URL = http://www.astroarch.com/wiki/index.php/Virtualization_Security_Round_Table_Podcast Virtualization Security Table round Podcast [url]

  • Truncate, but still have the fragmentation of the table?

    Hello

    We have just solved a performance problem, I guess that is because of the fragmentation of the table, but do not know how the fragmentation happened because the table is always truncated and recharged.

    I thought that TRUNCATE would always reset the HWM and fragmentation would not happen. Y at - there other possibilities?

    The work has always been less than 30 minutes. Recently, nothing is changed to any procedure, tables etc. - unconfirmed with maintenance DB s/n. Then the job runs up to 11 hours. By re-creating the table, the task runs from 11: 00 to 25mins. Note the work and the tables are years old.

    What could be the reason behind this please, ideas

    Thank you

    Amy

    Thank you all for your contributions.

    After a few days of investigations/tests with DBA, it is identified as not a problem of fragmentation of table.

    One of the additional queries has cost too much, the time elapsed for the sub query was 0.39 sec but saw 157 k lines, swipes the entire process super slow - window 8-11 hours.

    Did not understand why that truncate the table S and recreate the table S do somehow temporarily performance within 30 minutes well.

    Now, after the adjustment, it's up to 13 min, the cost is low 500 to 14. Not perfect for 157K load, much better than before - still space to rewrite the procedure.

  • SELECT from the table during a TRUNCATION operation...

    Nice day

    Environment: Oracle 10 g 2 EE on AIX and Crystal Reports/Crystal Enterprise (XI 3.1)

    We have a table that is refreshed every 10 minutes throughout the day and night. Users run reports against the table pretty well any time they want. The table is updated through OWB by using the TRUNCATE/INSERT that first truncates the table and then reloads the entire table.

    Opportunities random when the user runs the report at the same time as the update of the table, the user gets an error message from Crystal as follows:

    Error in the file ~ tmp23206abf4faed20.rpt: impossible to extract the data from the database. Details: [database vendor Code: 8103]

    In other cases, which is the one that I expect, the user sees a report empty and all simply of runs again the report. The report only takes a few seconds.

    This error could be due to the Crystal report trying to get the data in the table at the EXACT time that the table is truncated?

    Other thoughts are welcome!

    Thank you very much!

    -gary

    Hi Gary,.

    This behavior is described in MOS 170185.1

    Concerning
    Peter

  • How can I write time to build the table in just a few seconds?

    Hello world

    I am able to use "elapsed time" to send a time stamp to "build the table" using the output of 'elapsed time to text.  But after 59 seconds, it gives then a minute.  In the excel file, it is as follows:

    0 00:00:59

    0 00:01:00

    0 00:01:01

    I want to continue to 60, 61 seconds and so fourth.  When I try to connect to an another Subvi, it gives me a connection error.  Any help would be greatly appreciated?

    Thank you

    Ferriol

    I guess that's the Express VI, you can use the output of the time elapsed (s) instead of the number of seconds passed.  If you want a string, use the Format String VI, or build an array of DBL to add to the rest of your data.

  • Cannot drop the table

    The versions are Oracle 11.2.0.1.0 and Developer SQL 4.0.0.12 on Windows 7 Ultimate SP1.

    Hello

    I am training CBT Nuggets SQL basics (video #11) and cannot delete a table that I just created.  The command and the error are:

    drop table newprods;

    Error starting line: 1 at the controls.

    drop table newprods

    Error report-

    SQL error: ORA-00604: error occurred at the SQL level 1 recursive

    ORA-20000: cannot delete the object

    ORA-06512: at line 2

    00604 00000 - "an error occurred at the SQL level recursive %s.

    * Cause: An error occurred during the processing of a recursive SQL statement

    (a statement applicable to dictionary tables inside).

    * Action: If the situation described by the following error stack

    can be corrected, to do so; otherwise contact Oracle Support.

    As the HR user, I created two tables and created a FK constraint between them.  After truncating the table with this FK, I am unable to drop.  Even if I remove the FK, the error is the same.  Issing the command in SQL * Plus gives the same error.

    This is the first time that I have created a table from Oracle installation on this machine and is my first attempt to delete a table.  I did not create sequences, triggers, or views based on these newly created tables.

    Someone at - it ideas?

    See you soon

    Re: Unable to delete object?

  • Using GUI to truncate - wrong table 09.87 - bug 3.2.20.09 build HAND-

    Here's what I run into with this version of SQL developer. I can repeat this question every time with these steps.

    Connections, open a connection, tables in the list.

    Right-click on the table, select the privileges - Grant. Select the user ID, the actions and apply. (you do not need to take these steps, simply go through the motions)
    At this point, it doesn't matter if I stay in this connection or select another connection.

    Select another table by clicking on it so that it opens a new tab.
    Select Actions - Table - truncated.

    At this point you can expect the pop-up to display the table as you try to make a decision on, you are presented with the final table that you took measures to privilege on what is. This will open even a connection closed for these measures.

    So, if you don't pay attention, you're about to truncate the table hard!

    I am also able to repeat this with 3.1.07.42 where you are presented with the final table passed you by the movements of the privileges. (you don't have to take action.

    Published by: user2794298 on January 31, 2013 14:55

    Again, will be recorded as a bug.

    Work around this problem, use the context menu in the tree view to access the dialog box Truncate.

  • The tables stored in memory but can be viewed from other sessions

    Dear Oracle experts,

    It's maybe a stupid question, but I'm looking for the best opportunity to create a kind of temporary table that can be accessed from other sessions.

    Could you give some advice / keywords to speed up my research.

    Thank you very much

    Daniel

    danielwetzler wrote:
    danielwetzler wrote:
    I'm afraid that caching is not appropriate for my case due to the machines of reasons cited in my other ads...

    First of all I don't think you need to worry about the effectiveness of caching in your particular case. In addition, Oracle is very skillful when actually writing the Sales blocks from the buffer on the disk cache, so if your amount of data written to the array of result is quite small and no other activity is happening on your system it will not get written to disk immediately anyway but remain in memory until a condition is met that trigger the writer of the database in order to eliminate the blocks on the disk.

    But there are options that you might consider if you want to avoid as much overhead as possible and write the result of your calculation in the table of results as soon as possible.

    You can use the path direct inserts (INSERT / * + APPEND * /) and set the table of results for "NOLOGGING". In this way, no cancellation and minimum never do again is generated.

    Note, however, that there are certain reservations and restrictions to consider when using this approach, for example your result table will be not recoverable (what you say is OK), that a single direct-path insert access is allowed at the same time (it blocks the table exclusively, no other possible DML until you commit the transaction / rollback), and the direct-path insert access has some restrictions. If any of them apply that prevent the direct path operation, then it silently returns to the 'classic' insertion mode that generates the undo and redo. One of the most annoying restrictions is that you can not read a table that was written for in the direct-path access mode in the same transaction, you must first validate the transaction, otherwise you get "ORA-12838: cannot read/change an object after edit it in parallel." In other words, adding simply the indicator APPEND you might break the existing logic.

    Finally the direct path insert never reuses the space in the blocks below the current high waters, which means that if you make a direct path insert and then remove rows from the table and repeat once again a direct path operation will increase your insertion and empty in the blocks already used space segment won't get reused. Best way would be to truncate the table rather than deletion of lines of it.

    There are of the available workarounds to overcome some of these direct-path insert limits (exclusive lock, truncated rather than remove etc.), as the use of a table partitioned (if you have an appropriate edition/license), because direct-path inserts of access may be limited to the partitions. In this case you can do simultaneous direct-path inserts if you use different partitions, but then you sort of logic that determines which partition to use.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

Maybe you are looking for

  • Bootcamp partitions not bootable with iMac 2015

    Hi guys,. I tried to install boot camp on my iMac (late 2015, Fusion drive) without success. Download a picture ISO of Windows 10. Point the wizard Boot camp on the image. Create a partition for Windows. Click install and wait until the end. Restarti

  • New iPad 9.7 Pro warped, bent, concave

    Just got my new iPad Pro 9.7 256 GB wifi only in space grey, noticed that it is slightly distorted/bent concave, I wonder if this is done by design to stabilize the camara bump when laying flat. Anyone else notice the same thing? do not know if I nee

  • What is the fastest method producer consumer. Queue, RT-FIFO, event

    Hi all Another question completed for the pro: I recently inherited the labview code that uses RT-FIFO for the transfer mechanism in the architecture of the producer consumer. The code was first written in 3-4 years and is currently in LV8.6. It is p

  • Problems during execution of a LabVIEW VI in a new thread under TestStand sequence and execution of the MainSequence in step by step mode

    Hello We want to run a VI in LabVIEW (LV2011) at the same time to the execution of a sequence of test of TestStand (TS2010). The VI should view the condition of the equipment, while the test sequence is written in TestStand. It would be a nice featur

  • How to decrypt my Tablet

    I have test the encryption function is ok but now, I need to update firmware for 75_ROW I need decryption before upgrade. 1 tell me how my Tablet decryption 2 tell me about how update firmware in recovery mode, while the Tablet is still encryption Th