Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 768491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:11:25+00:00 2026-05-14T18:11:25+00:00

I have two very large enterprise tables in an Oracle 10g database. One table

  • 0

I have two very large enterprise tables in an Oracle 10g database. One table keeps the historical information of the other table. The problem is, I’m getting to the point where the records are just too many that my insert update is taking too long and my session is getting killed by the governor.

Here’s a pseudocode of my update process:

sqlsel := 'SELECT col1, col2, col3, col4 sysdate  
        FROM table2@remote_location dpi
         WHERE (col1, col2, col3) IN
               (
                SELECT col1, col2, col3
                  FROM table2@remote_location 
                 MINUS
                SELECT DISTINCT col1, col2, col3
                  FROM table1 mpc
                 WHERE facility = '''||load_facility||'''
               )';

EXECUTE IMMEDIATE sqlsel BULK COLLECT
                 INTO table1;

I’ve tried the MERGE statement:

MERGE INTO table1 t1
USING (
  SELECT col1, col2, col3  FROM table2@remote_location 
  ) t2
ON (
t1.col1 = t2.col1 AND
t1.col2 = t2.col2 AND
t1.col3 = t2.col3 
)

WHEN NOT MATCHED THEN
  INSERT (t1.col1, t1.col2, t1.col3, t1.update_dttm  )
  VALUES (t2.col1, t2.col2, t2.col3, sysdate  )

But there seems to be a confirmed bug on versions prior to Oracle 10.2.0.4 on the merge statement when doing a merge using a remote database. The chance of getting an enterprise upgrade is slim so is there a way to further optimize my first query or write it in another way to have it run best performance wise?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:11:26+00:00Added an answer on May 14, 2026 at 6:11 pm

    Have you looked at Materialized Views to perform your sync? A pretty good into can be found at Ask Anantha. This Oracle white paper is good, too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two arrays, one is very large (more than million entries) and other
I have a very large database (~100Gb) primarily consisting of two tables I want
I have two very large tables, Table1 and Table2. They look like this: Table1
I have two very large tables and I need to process a small resultset
I have two very large(30000+ documents) collections, one contains words extracted from a text
I have two tables with identical structure and VERY LARGE number of fields (about
I have two tables that have virtually identical content and very similar structure. They
I want to build an enterprise application that will have very large number of
I have two very large files we'll call Old and New. New contains many
I have two very large strings and I am trying to find out their

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.