|
|
|
|
Re: SELECT works, INSERT+ SELECT hangs in SQLDeveloper Tools [message #601325 is a reply to message #601314] |
Tue, 19 November 2013 12:43   |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
royalyogi wrote on Tue, 19 November 2013 21:32
The strange think is,
that the select without insert completes in just a few seconds but the insert+select query would hang without output in sqldeveloper.
But, what are you actually doing? A select statement might be a projection or selection. And an insert statement is a DML transaction. So please post what exactly you are doing. The sticky on top of performance tuning forum would help you on how to post regarding performance tuning questions.
|
|
|
|
|
Re: SELECT works, INSERT+ SELECT hangs in SQLDeveloper Tools [message #601365 is a reply to message #601357] |
Wed, 20 November 2013 02:13   |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
royalyogi wrote on Wed, 20 November 2013 06:42But same query is running fine in production database and production database is also returing same number of rows. So I don;t think returning number of rows is problem.
Just for completeness: about how many rows are you talking?
If there is a primary key/unique constraint on the table to which the rows are inserted, then INSERT may wait until another session INSERTing/UPDATing to the same PK/UQ values commits its changes.
But, of course, without providing a test case - CREATE TABLE statements for table structure, INSERT statements for sample data and the steps reproducing the issue - it is imposible to spot the reason, we may just make (more or less) qualified guesses as I did.
|
|
|
|
Re: SELECT works, INSERT+ SELECT hangs in SQLDeveloper Tools [message #601370 is a reply to message #601365] |
Wed, 20 November 2013 03:05   |
 |
royalyogi
Messages: 22 Registered: November 2013 Location: India
|
Junior Member |

|
|
same query run fine in production database and checked table structre,parameters and memory are same in both the databases.
But script run fine and not run in nonproduction database using SQLDeveloper tool.
Number of Rows:15890
Table structure:
CREATE TABLE "I$USER_WUS"
( "DOWNLOAD_DATE" DATE,
"ROW_STATUS" VARCHAR2( ,
"PROCESS_FLAG" CHAR(2),
"RECORD_NO" NUMBER(5,0),
"USER_ID" VARCHAR2(64),
"REF_COUNTRY" CHAR(2),
"PROFILE_CODE" VARCHAR2(64),
"USER_TYPE" VARCHAR2(64),
"WEB_VISUALISATION" CHAR(1),
"ADDRESS_LINE_3" VARCHAR2(128),
"CITY" VARCHAR2(64),
"POSTAL_CODE" VARCHAR2(50),
"COUNTRY_NAME" VARCHAR2(128),
"PHONE" VARCHAR2(60),
"MOBILE_PHONE" VARCHAR2(60),
"FAX_NUMBER" VARCHAR2(60),
"E_MAIL" VARCHAR2(250),
"MIFID" NUMBER(1,0),
"PROPOSITION" NUMBER(1,0),
"REPORTING" NUMBER(1,0),
"IND_UPDATE" CHAR(1)
) SEGMENT CREATION DEFERRED
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
NOCOMPRESS NOLOGGING
TABLESPACE "ODATA"
|
|
|
Re: SELECT works, INSERT+ SELECT hangs in SQLDeveloper Tools [message #601373 is a reply to message #601370] |
Wed, 20 November 2013 04:21   |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
Do you really think it contains anything useful for reproducing your problem? No note about the use of table (source or destination one?), other points (DML for sample data, query) missing at all.
With the details you posted I may state this explanation: there is somewhere something wrong.
Good luck in detecting it.
|
|
|
Re: SELECT works, INSERT+ SELECT hangs in SQLDeveloper Tools [message #601381 is a reply to message #601370] |
Wed, 20 November 2013 05:36   |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
royalyogi wrote on Wed, 20 November 2013 14:35same query run fine in production database and checked table structre,parameters and memory are same in both the databases.
But script run fine and not run in nonproduction database using SQLDeveloper tool.
cookiemonster wrote on Wed, 20 November 2013 14:31Post the select statement, the insert statement, the explain plan for both (or better tkprof) and the number of rows selected.
You have not yet mentioned that what exactly are you doing? Is it a plain SQL that you are using for the task? Or is it PL/SQL? Please post the things as suggested by cookiemonster.
|
|
|
|
|
|
|