| Performance tuning [message #409628] |
Tue, 23 June 2009 06:26  |
deepbans Messages: 32 Registered: February 2009 |
Member |
|
|
Hi,
I am running a query with search criteria that contain only one Value in IN.Its giving a low cost at explain plan.All the tables are accessed by INDEX.
But at time same time if I give two values in IN Block of Where.Its giving huge cost in execution plan and most of the tables are full scanned(causing High cost)
What can be Reason for this,any idea?
Thanks In Advance.
|
|
|
|
| Re: Performance tuning [message #409652 is a reply to message #409633] |
Tue, 23 June 2009 07:19   |
deepbans Messages: 32 Registered: February 2009 |
Member |
|
|
Its like When I give
e.g.
Select * from emp where empno IN(1234)
It is giving fast data with low cost.But if I give
Select * from emp where empno IN(1234,12345)
It is giving data very late and cost of the query is too high.
Thanks
|
|
|
|
|
|
|
| Re: Performance tuning [message #410184 is a reply to message #409652] |
Thu, 25 June 2009 10:22  |
prachij593 Messages: 198 Registered: May 2009 |
Senior Member |
|
|
If stats are up to date then Do we need to know how many rows aree there individually ?
Select count(*) from emp where empno IN(1234);
Select count(*) from emp where empno IN(12345);
[Updated on: Thu, 25 June 2009 10:22]
|
|
|