Advertisement

05.19.2008 at 03:10PM PDT, ID: 23415364
[x]
Attachment Details

Whats the best way to quickly insert hundreds of millions of records to an indexed and partitioned table?

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8
Tags:

Oracle, Oracle 10g database, Oracle 10g, PL/SQL, Ms IE, 04098.00000  trigger %s.%s is invalid and failed re-validation

Hi!
I have a table 'table1' containing about 3.8 billion records. The table has range partions(weeky dates) and hash partitions( id). The thing is, i have realised that i would need to add about a 150 m records to each partition(30 in total). Every time i insert data for a single partition, it seems to take about 20 hours before it finishes. i know its looking up the entire table before it inserts a record and inserting to a specific partition will improve performance;
How do i insert to a specific partition? How do i disable the indexes for that partition and rebuild them after inserting?
Will it be faster if i disabled all the partitions for the entire table, do the insertions and rebuild them later rather than partition by partition?
If i drop all Indexes, what's the estimated time will it take to rebuild them (the table will have grown to a 5 billion records table)? Let me know the best way of going about all these please.

I know Oracle 10g gathers statistics from the box every night, but how can i update the statistics of the table as i wish - Like after insertion to each partition to make sure it worked? I tried

EXEC dbms_stats.gather_table_stats( 'schema_name','Table1',cascade=>TRUE);

but got an error in SQL Developer(04098.00000  trigger %s.%s is invalid and failed re-validation).
Is this right way of generating the statistics? When i ran the same command on SQL *Plus (and logged on as DBA), it shows a busy Cursor. It has been running for sometime now, does it mean the procedure is correct? The error came immediately in SQL developer but i have seen nothing in SQL *Plus -other than the busy cursor, and am not sure whether it's executing or hunged. How quickly does an error show up in SQL *Plus compared to SQL Developer?

Any other ideas unknown to guy relatively knew to oracle that would help improve access speeds to this table will be greatly appreciated.

Thanks

Attachments:
 
Screen shot of the error i got (dbms_stats.gather_schema_stats)
 
Answered By: sdstuber
Expert Since: 10/06/2003
Accepted Solutions: 1846
Computer Expertise: Advanced
sdstuber has been an Expert for 5 years 3 months, during which he has posted 7484 comments and answered 1846 questions. sdstuber is just one of 761 experts in the Oracle 10.x Zone. 2 experts collaborated on this answer, which was graded an "A" by the asker.
 
 
20081119-EE-VQP-48 / EE_QW_2_20070628