Parameterized query response time

Parameterized query response time

Postby tufankupeli » Wed 30 Mar 2011 06:52

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)
tufankupeli
 
Posts: 2
Joined: Wed 30 Mar 2011 06:23

Postby Shalex » Wed 30 Mar 2011 14:05

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.
Shalex
Devart Team
 
Posts: 7369
Joined: Thu 14 Aug 2008 12:44

Postby tufankupeli » Wed 30 Mar 2011 14:32

1- OracleCommand
2- OCI and direct mode result's time same
3- dotConnect for Oracle = 6.10.126.0
oracle server = 10g
oracle client = 10g
4-sory we cant send ddl or dml script.. private data.
5- if you give me your email, i can send my query and connection script
tufankupeli
 
Posts: 2
Joined: Wed 30 Mar 2011 06:23

Postby Shalex » Mon 04 Apr 2011 13:55

We have answered by e-mail.
Shalex
Devart Team
 
Posts: 7369
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle