Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Speed between ODBC and Embbded SQL
"LeguMan" <vgi_at_sgms.sema.be> wrote in message
news:3afcf1f2$0$3121$456d72a3_at_news.skynet.be...
> Hello,
>
>
> I am asking why à Embdded SQL Code (Proc) are very fast and the same query
> in ODBC are so slow ?
>
>
> The query recive by oracle are :
>
> For ODBC :
>
> SELECT agent.pwd
> FROM agent
> WHERE upper(agent.mnemo)='TSX'
>
>
> For Embdded SQL :
>
> SELECT agent.pwd
> INTO :b0
> FROM agent
> WHERE upper(agent.mnemo)=:b1
>
>
> Thanks
> LeguMan
>
>
You are comparing apples and pears.
ODBC is a generic product, interfacing to theoretically, any database. Hence
ODBC has it's own dll's and runs on top of sqlnet. Pro*C directly interfaces
to sqlnet.
ODBC needs to translate to native Oracle calls.
Also, any function not supported by Oracle directly, will force the query to
run on the client completely.
If you are using ODBC in conjunction with VB or Visual ++ you might consider
using Oracle Objects for OLE,
This is DAO like interface to Oracle, and it interfaces directly to sqlnet.
Hth,
Sybrand Bakker, Oracle DBA Received on Sat May 12 2001 - 06:12:19 CDT