Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Speed between ODBC and Embbded SQL

Re: Speed between ODBC and Embbded SQL

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Sat, 12 May 2001 15:06:39 GMT
Message-ID: <3kcL6.6741$la.89049@news1.sttls1.wa.home.com>

Also unless you are using function based indexes the query you are issuing will be slow no matter what API you use to send it. The upper(agent.mnemo) is going to force a full table scan (unless you create a function based index). Also ODBC uses string substitution for host variables (and thus doesn't really use them) and so you are going to put an unnecessary parse load on the server thus using way too much CPU for what you want to do. Use host variables.
Jim

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:tfq6gnhrgnvef1_at_beta-news.demon.nl...
>
> "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 - 10:06:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US