LOV taking long time [message #613961] |
Wed, 14 May 2014 01:19 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
I have LOV in that only 1 record , i ran the same LOV Query in the TOAD Database some times it is taking 10 second's and some time it is taken 5 min .
And the same in the LOV also in the Oracle forms.
Please help
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: LOV taking long time [message #613990 is a reply to message #613988] |
Wed, 14 May 2014 02:59 |
cookiemonster
Messages: 13962 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
And then try this approach for generating the explain plan:
SQL> explain plan for select * from dual;
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 3543395131
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------
8 rows selected.
SQL>
|
|
|
|
Re: LOV taking long time [message #613994 is a reply to message #613993] |
Wed, 14 May 2014 03:55 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Doesn't look as if it should take minutes to return the result (though, I'm not an expert here).
However, you seem to be misunderstanding what NVL function does and how it works. The way you put it, it does nothing. For example, this:NVL ('1011', c.source_header_type_id) NVL checks the first argument. If it is NULL, it uses the second argument. '1011' is a constant, it can never be NULL, which means that you don't need NVL at all. Did you mean to useNVL (c.source_header_type_id, '1011') instead?
|
|
|
|
|
|
|
|
Re: LOV taking long time [message #614020 is a reply to message #613972] |
Wed, 14 May 2014 09:16 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
mist598 wrote on Wed, 14 May 2014 12:26How can i tune the query in the Clients servers?
You have been consistently using the term "client servers". I am curious to know what do you mean by it and what others are supposed to interpret?
1. What is your DB version? I don't see you mentioned in the topic.
2. Is the execution plan changing at run time when you see a marginal time difference in the execution times?
3. What is the number of rows actually returned by the query? Is there any difference in the cardinality estimates and actual rows returned?
I would like to quote what Kevin Meade says about sql tuning :
"SQL tuning is all about getting correct cardinality estimates"
Probe such questions to yourself and post the details.
Edit : typo
[Updated on: Wed, 14 May 2014 09:21] Report message to a moderator
|
|
|
Re: LOV taking long time [message #614021 is a reply to message #614020] |
Wed, 14 May 2014 09:32 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Quote:You have been consistently using the term "client servers". I am curious to know what do you mean by it and what others are supposed to interpret?
Is this not correct to do(tuning process) without inform to the Clients..
Quote:1. What is your DB version? I don't see you mentioned in the topic.
10.1.0.4.2
Quote:2. Is the execution plan changing at run time when you see a marginal time difference in the execution times?
I didn't see any execution times , means not getting any execution times(column)
Quote:3. What is the number of rows actually returned by the query?
only 3 rows returned by the Query
I am new to do this please help...
[Updated on: Wed, 14 May 2014 09:33] Report message to a moderator
|
|
|
Re: LOV taking long time [message #614022 is a reply to message #614021] |
Wed, 14 May 2014 10:04 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
Don't say that you don't know the actual time taken by the query to execute. If you don't know then ho would anyone know in this forum?
Please execute the query in sqlplus and set timing on. You need to tell us how much time is the query actually taking to execute. If
the time and cardinality estimates in explain way are way off w.r.t. to actuals, then there is an issue with the statistics.
[Updated on: Wed, 14 May 2014 10:09] Report message to a moderator
|
|
|
|
|
|
|
|