I have a query which select values from 4 tables and "where" contains 22000 record with "or".
like :
....where SITENAME =:1 OR SITENAME =:2 OR SITENAME =:3 OR SITENAME =:4 ....................
this parameterized query's result return at 4 mins.
--------------------------------------------------------------------------------
on the other hand if i prepare query string on c# like
like
...where SITENAME ='12345' OR SITENAME ='12346' OR SITENAME ='12347' OR SITENAME ='12348' ....................
this generated string query's result return 17 secs
---------------------------------------------------------------------------------
Something is wrong ?
i have to use parameterized query. What is the problem and how can fix this?
Thanks.
NOTE : if you need i can put here all query (it is big)
Parameterized query response time
Please give us the following information:
1. Are you executing this query via OracleCommand or some ORM (Entity Framework or LinqConnect)?
2. Are you using the OCI (via Oracle Client) or Direct mode? Try changing your mode. Does it make any difference?
3. Tell us the exact versions of your dotConnect for Oracle (x.xx.xxx), Oracle server, and Oracle client (if OCI is used).
4. If possible, send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment.
1. Are you executing this query via OracleCommand or some ORM (Entity Framework or LinqConnect)?
2. Are you using the OCI (via Oracle Client) or Direct mode? Try changing your mode. Does it make any difference?
3. Tell us the exact versions of your dotConnect for Oracle (x.xx.xxx), Oracle server, and Oracle client (if OCI is used).
4. If possible, send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment.
-
- Posts: 2
- Joined: Wed 30 Mar 2011 06:23