-
what will be right way to deal with this query
Hi All,
I have on single line query. i alway see this query fired
on my database.this query fetch single column and cpu cost is too high 1637557 and cost is only 26.this query is fired reguarly.
what will be better way to deal with this query.
-
Try re-writing the query. What is the optimizer mode? Are the tables involved analyzed?
Thanx
Sam
Life is a journey, not a destination!
-
What is the query? something like
Code:
select username from dual;
or
Code:
select sysdate from dual;
-
select code12 from m_s12 where flnt402 =:1 order by code12
this the query that is taking cpu cost is too high 1637557 and cost is 26.
what we can do with this.
what u suggest me to do.
-
What's the explain plan, how many rows is it retrieving, is flnt402 indexed, is the table index-organized?
Also, why is this code being executed so many times? Is it a case of PL/SQL looking up values then joining to another data set through PL/SQL code instead of through SQL?
-
it is fetching 7262 rows and the column is indexed primary key
it is used as part of pl/sql
-
it's building a list to use as a lookup table inside PL/SQL?
-
we can not do anything regarding this query
-
How fragmented the table is? What does the explain plan show? What is the optimizer it was trying to make use of in the explain plan? Also is it a simple pk or composit pk?
Thanx
Sam
Last edited by sambavan; 12-12-2005 at 04:08 PM.
Thanx
Sam
Life is a journey, not a destination!
-
If you can make this an index-organized table on a composite pk of (flnt402,code12) then that would be beneficial.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|