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

  • Home
  • SEARCH
  • 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 8151635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:26:57+00:00 2026-06-06T15:26:57+00:00

I have an INSERT query in Oracle 10g that is getting stuck on a

  • 0

I have an INSERT query in Oracle 10g that is getting stuck on a “SQL*Net message from dblink” event. It looks like:

INSERT INTO my_table (A, B, C, ...) 
  SELECT A, B, C, ... FROM link_table@other_system;

I do not see any locks on my_table besides the one from the INSERT I’m trying to do. The SELECT query on link_table@other_system completes without any trouble when run on its own. I only get this issue when I try to do the INSERT.

Does anyone know what could be going on here?

UPDATE
The SELECT returns 4857 rows in ~1.5 mins when run alone. The INSERT was running over an hour with this wait message before I decided to kill it.

UPDATE
I found an error in my methods. I was using a date range to limit the results. The date range I used when testing the SELECT only was before the last OraStats run on the link_table, but the date range that I used when testing the INSERT was after the last OraStats run on the link_table. So, that mislead me to believe there was a problem with the INSERT. Not very scientific of me to do this; my mistake.

  • 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-06-06T15:26:59+00:00Added an answer on June 6, 2026 at 3:26 pm

    Are you using a /*+ driving_site(link_table) */ hint to make Oracle perform the joins on the remote server?

    If so, that hint will not work with DML, as explained by Jonathan Lewis on this page.

    This may be a rare case where running the query just as a SELECT uses a very different plan than running the query as part of an INSERT. (You will definitely want to learn how to generate explain plans in your environment. Most tools have a button to do this.)

    As Andras Gabor recommended in the link, you may want to use PL/SQL BULK COLLECT to improve performance. This may be a rare case where PL/SQL will work faster than SQL.

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

Sidebar

Related Questions

I have an INSERT query that is pulling data from two tables and inserting
I have to migrate this query (simplified here) from T-SQL to ORACLE SET IDENTITY_INSERT
I have a java.sql.Clob object which I populate from an Oracle query and then
I have an insert query for MySQL that looks like this: INSERT INTO table
I have an insert query to execute from within a C# against a SQL
I have an insert query that gets generated like this INSERT INTO InvoiceDetail (LegacyId,InvoiceId,DetailTypeId,Fee,FeeTax,Investigatorid,SalespersonId,CreateDate,CreatedById,IsChargeBack,Expense,RepoAgentId,PayeeName,ExpensePaymentId,AdjustDetailId)
I have a query: insert into #tmpRcIzm select distinct v.id_art, 'Y' from openxml(@hDoc, '/art_komp/nol')
I have the following query to insert into a table BULK INSERT tblMain FROM
I have strange oracle optimizer behaviour: SELECT a.id, a.date_insert, a.message#cnt FROM T_MESSAGE_TRANSMIT A, T_LIST
In my ASP.net C# web project I have a query command object that has

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.