Discussion Locked

Visual Basic/Oracle - Slow Querying

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Using Visual Basic to talk to table in Oracle database. Indexes have already been set but query is still deathly slow. If I link to table through VB Access, this is a lot faster but I don't want to use VB Access. Has anyone experienced similar issues and if so how did you resolve them? Is it the VB or the Oracle that needs tweaking?

9 replies

by peyison

How are you connecting to your Oracle database? First thing to check is to make sure you're using the latest drivers or providers. Try downloading the latest version of MDAC from Microsoft - www.microsoft.com/data. Then - try using the Oracle ADO provider: Provider=MSDAORA.1

If this still doesn't help, you should be able to see if the problem is on the Oracle (or possibly the network) side by running a query in SQL*Plus. If it is responsive, the problem is probably related with the way VB istalking to Oracle.

Hope this helps.

by peyison

How are you connecting to your Oracle database? First thing to check is to make sure you're using the latest drivers or providers. Try downloading the latest version of MDAC from Microsoft - www.microsoft.com/data. Then - try using the Oracle ADO provider: Provider=MSDAORA.1

If this still doesn't help, you should be able to see if the problem is on the Oracle (or possibly the network) side by running a query in SQL*Plus. If it is responsive, the problem is probably related with the way VB istalking to Oracle.

Hope this helps.

by karlww

How does the query run in SQL*PLus?

Have you analyzed the query and looked at the Explain Plan? Go to www.toadsoft.com and download the free TOAD. Examine your query and optimize it.

I do VB/Oracle coding all the time and slow running queries are ALWAYS the fault of a poorly tuned query...which is often not your fault. The Oracle optimzer sometimes needs a hint embedded in the query.

by karlww

One thing I forgot to mention. Access can SEEM fast because if the query returns many rows, Access will only display those that have been returned so far. Scroll down to the last record in the query and see how long that takes.

This discussion is closed to new replies.