Home > database >  When performing complex queries, data window in a "no response"? How to solve?
When performing complex queries, data window in a "no response"? How to solve?

Time:09-26

The whole table number of records in being, my statement is to retrieve a constructed an index of columns, use the in keyword, there are more than 20 value in parentheses,
Middle also used the union all, obviously, the query is more time-consuming fee resources,
I use the program execution other simpler but returned result set is also very big query is very normal,
But when executing the query and wait for 4 to 5 seconds, as shown in the task manager application status to "no response",
And procedures can't response my other operations, is this why?
Please everyone help! Thank you very much!
PS: my window use ROW TO DISK and RetrieveASNEEDED options,

CodePudding user response:

In the inside of the parentheses results into a temporary table, link again!

CodePudding user response:

Xuam said on the second floor is a good idea, but I want to know is what causes this to happen,
I run in the PL/SQL developer is very good!

CodePudding user response:

In values can be built in the temporary table, or

(select 1 I from dual
Union all
I select 2 from dual
Union all
Select 3 I from dual) a

CodePudding user response:

Use stored procedures.

CodePudding user response:

Back to the third and fourth floor:
If I use the session class temporary table, then, between PB session is refers to the connect and disconnect?
If I were in PB in call a stored procedure, and in the process of using a temporary table, will not stored procedure into another session?
In addition, if the query time is longer, partial time I submit things, process in the middle of the open cursor statement will cause the program to hang up?

CodePudding user response:

Don't know you how much this result set, in addition, also don't know your the complexity of the data window, the server or client, poor judgment, the server side, you can try your way upstairs, the client can try multi-threading, f1, see SharedObjectRegister and related functions, PB is single-threaded, will certainly lose the response time is long, of course, if the client is a single core processor, no matter what you use, the results are the same,

CodePudding user response:

Back to the sixth floor:
I'm sure is not caused by the server, because, after the loss of response process, I entered the oracle OEM, still can see the statements in the execution,
I'll see if SharedObjectRegister and related functions, and see if I can solve the problem, thank you very much!
Start another thread to query is better, because the program still can respond to user other operation, during operation

CodePudding user response:

Continue to back to the sixth floor:
The returned result set is not big, can't more than 50000, the data window is created dynamically, not complicated,

CodePudding user response:

Query SQL optimization, do not use in the table to retrieve fields indexed
In the datawindow retrieverow add yield ()

CodePudding user response:

Yield () method can not solve the problem, I use the SharedObjectRegister to create a thread, but the problem is that in the custom in the class can't call any object in the main thread, so that I can't to retrieve data window by command,

CodePudding user response:

Common usage is to create a thread to retrieve or circular filling time-consuming operation, you also need to an intermediate object, will return to the main thread of the newly created thread results, make the main thread thread to retrieve the way you do, don't know is why? If really need, it is through the intermediate object to trigger the main thread, and cannot be called directly

CodePudding user response:

Sjlion, listen to what you have said, the feeling can do it, can you show some code,
There are two main problems: 1, how to create a thread to retrieve,
2, this thread after the retrieved data, how to return to the main thread,
I look at the Shared object related practices, the feeling between the main thread and create a thread communication ability is very limited, and create a thread cannot call visual object, how to execute the query and return the results to the main thread?
  • Related