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 -> Long time to retrieve first record with ADO

Long time to retrieve first record with ADO

From: Stefan Busato <stefan.busato_at_mitc.be>
Date: 11 Apr 2002 03:12:35 -0700
Message-ID: <421cdd41.0204110212.224f2bd9@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 - 05:12:35 CDT

Original text of this message

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