OCI slowness
From: David Campbell <dave_at_mizar.csis.dit.csiro.au>
Date: Mon, 11 Oct 1993 07:54:45 GMT
Message-ID: <1993Oct11.075445.24082_at_csis.dit.csiro.au>
Date: Mon, 11 Oct 1993 07:54:45 GMT
Message-ID: <1993Oct11.075445.24082_at_csis.dit.csiro.au>
I am experiencing some problems with Oracle's OCI C-call interface and Oracle 7.0.12.
Our database has a "title" table, say like this:
SQL> describe title;
Name Null? Type
------------------------------- -------- ----
TITLPREF VARCHAR2(2)
TITLEVOL VARCHAR2(4)
TITLFOL VARCHAR2(4)
.....
They are indexed by one non-unique index with three fields.
When I execute the following query using sqlplus, I get an instantaneous response:
select titlpref, titlevol, titlfol from title
where titlpref = 'CT'
and titlevol like '123%'
and titlfol like '45%'
When I code up the same query using OCI I get the same tuples returned, but the query takes about 3 minutes!!!! I think that for some strange reason, Oracle decides to perform a linear search of the entire table.
I've yet to determine whether the same occurs using embedded-SQL.
Can anybody offer any answers/solutions? Is this a bug fixed in a later release?
Thanks,
-- Dave Campbell
'''
(o o)
+------------------------------oOO--(_)--OOo----+--------------------------+
| Dave Campbell (dave_at_csis.dit.csiro.au) | |\ ____|\ |
| Phone: + 61 6 275 0944 Fax: + 61 6 257 1052 | |\___ /\ \ / / \ |
| CSIRO Division of Information Technology | | _ \ / \ \_/ / ____> |
| Centre for Spatial Information Systems | | |> > __ \ / \ \___ |
| GPO BOX 664 _--_|\ | |__ /_/ \ \_/ \___/ |
| CANBERRA ACT 2601 / \ | \/ \/ |
| AUSTRALIA \_.--._/ <- Canberra | Get right, or get left! |
| v | Heb 2:3 |
+-----------------------------------------------+--------------------------+
Received on Mon Oct 11 1993 - 08:54:45 CET
