If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Need help speeding up my app

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-27-04, 11:37
Triple A Triple A is offline
Registered User
 
Join Date: May 2004
Posts: 9
Need help speeding up my app

I have an application that has to access up to 4 databases. On my home network it works reasonably fast, probably because nobody else is using the database. But at work it is very slow. It can take up to a minute to access the data. So I am looking for ways to speed up the process. I know that there are a lot of variables associated with database access so maybe I can optimize a few of them. This is the function I use to access the database. Maybe you guys can make a few recommendations.

Function Compland(SQLQuery As String) As ADODB.Recordset

Dim Database As ADODB.Connection
Dim Bestand As ADODB.Recordset
Set Database = New ADODB.Connection

Database.ConnectionString = "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=d:\database\database.dbf ;adLockReadOnly "
Set Bestand = New ADODB.Recordset

With Bestand
.CursorLocation = adUseClient
.LockType = adLockReadOnly
.CursorType = adOpenForwardOnly
Call Database.Open
Set .ActiveConnection = Database
Call .Open(SQLQuery)
Set .ActiveConnection = Nothing
End With
Database.Close
Set Compland = Bestand

End Function
Reply With Quote
  #2 (permalink)  
Old 08-30-04, 04:50
Marvels Marvels is offline
Registered User
 
Join Date: Jul 2003
Location: Amsterdam, Nederland
Posts: 449
Wink Speed

Hi,

The connection buildup seems ok, but i haven't got much Dbase time in me
Here are some other things you might look at

- see what kind off db you have are the tables indexed and if yes where are they indexed
- how big are the tables you unleach your SQL (if there are ten rows or 1 mil)
- how is your SQL-structure (big selection, much calculations slows it down)
- how is the connection to the network db

Tip look if you can do the following : Make Access table link to the dbase tables and run your querry there if its slow there also you have a clue where to look, Sometimes the db-guys will give you less priority on your sql because there bussy them selfs

suc6 daar -^.^-
Reply With Quote
  #3 (permalink)  
Old 08-30-04, 14:36
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
dBase, like Access, is a file-based database storage mechanism; the entire table structure(s) is copied over the network to the client before the query actually runs.
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On