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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Long time to retrieve first record with ADO

Re: Long time to retrieve first record with ADO

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 11 Apr 2002 13:29:39 +0100
Message-ID: <3cb581b4$0$8510$ed9e5944@reading.news.pipex.net>


Are columns a.b and c indexed?

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
"Stefan Busato" <stefan.busato_at_mitc.be> wrote in message
news:421cdd41.0204110212.224f2bd9_at_posting.google.com...

> Hi,
>
> I'm opening an ADO recordset in VB6. Opening the recordset is executed
> immediately. Retrieving the first record however takes about 45
> seconds. After that, moving through the recordset goes quickly.
> Changing the cursortype doesn't make a difference.
>
> The SQL statement looks like this:
>
> SELECT TABLE1.Col
> FROM TABLE1
> WHERE EXISTS (SELECT TABLE2.a
> FROM TABLE3, TABLE2
> WHERE TABLE3.b=TABLE2.b AND
> TABLE2.a=TABLE1.a AND
> TABLE3.c=Value)
>
> Table1 contains 16 rows.
> Table2 And Table3 contain over 100000 rows.
>
> When I remove the expression TABLE1.a=Table2.a from the subquery, the
> waiting time is also reduced to about 0, but then of course, there's
> no more link with the main query.
> However, executing the query in SQLPlus gives the result immediately
> (12 rows)
>
> The strange thing is that most of the other queries I use don't have
> this problem.
>
> Can anyone help me out with this?
> I'm using ADO 2.1 to connect to an Oracle 8.1.5 Database
>
> Thanks,
>
> Stef
Received on Thu Apr 11 2002 - 07:29:39 CDT

Original text of this message

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