Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sequence.nexval hanging my query

913578Jun 8 2019 — edited Jun 10 2019

Hi,

I have a query fetching data from remote server and inserting in my local table.

when i run the below query it is hanging. when i run without sequence it is working completing execution in 2 seconds.

INSERT

INTO CIS_SERVICE_TOPO_DESC_STAGING

  (

    TELSTRA_ADDRESS_ID,

    UNIT_NUMBER,

    FLOOR,

    STREET_NUMBER,

    SEQ_NUM,

    WIZ_HEADEND_CODE,

    WIZ_NODE_CODE,

    SERVICE_ID

  )

SELECT A.TELSTRA_ADDRESS_ID,

  A.UNIT_NUMBER,

  A.FLOOR,

  A.STREET_NUMBER, 

  SDCACHE_IMPORT_KEY_SEQ_NEW2.nextval,

  A.WIZ_HEADEND_CODE,

  A.WIZ_NODE_CODE,

  B.SERVICE_ID

FROM SDCABLEINV.SERVICE_TOPOLOGY@SUPERDAM_DBLINK A,

  SDCABLEINV.SERVICE_DESC@SUPERDAM_DBLINK B

WHERE A.TELSTRA_ADDRESS_ID=B.TELSTRA_ADDRESS_ID;

I have checked the sequence object is in valid state. and able to run the as below. sequence number is populating .

select

--A.UNIT_NUMBER,

SDCACHE_IMPORT_KEY_SEQ_NEW2.nextval

FROM SDCABLEINV.SERVICE_TOPOLOGY@SUPERDAM_DBLINK A,

  SDCABLEINV.SERVICE_DESC@SUPERDAM_DBLINK B

WHERE A.TELSTRA_ADDRESS_ID=B.TELSTRA_ADDRESS_ID;

when i put at least one column in the above select statement it is hanging.

Thanks.

Comments
Post Details
Added on Jun 8 2019
13 comments
2,343 views