Re: Speed issue...
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Thu, 14 Jun 2007 20:41:58 -0500
About 30 fields, number and text. No blobs, no long strings.
It is constantly slow. I am also using CalcFields event and turning
that off speeds things up by 2x when scrolling the database. Instead
of 1 second it takes about 0.5 seconds to move to the next record.
Each scroll operation executes a new Locate call with 2 indexed fields on
a database with about 3000 records.
DataForm.Table.Locate('LoID;CoID', VarArrayOf([DataForm.LTable['ID'],
DataForm.CTable['ID']]),[]);
Thats where the 0.5 second comes from. All tables here are TAdoTable.
The CalcFields fills four Calculated fields with the sum of 3 other number
fields
from the same record. This is the other 0.5 seconds of the .Next call cost.
Making an edit is as slow as I mentioned.
Since you are using TadoTable try turning the TableDirect property to True.
This will have Access use an internal cursor instead of generating a Select
statement. This is faster for Access. You can also try replacing your Locates
with Seek if the fields you are locating on are indexed.
Also try disableControls on the table you are locating on and Enablecontrols
after the locate if you have any controls connected to these tables.
DisableControls adds some speed when moving records even if there are no
controls attached.
If there are any detail tables connected to the table you are scrolling you
might want to disable controls on them to especially if they are not visible.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: Speed issue...
- From: Atmapuri
- Re: Speed issue...
- From: Atmapuri
- Re: Speed issue...
- References:
- Speed issue...
- From: Atmapuri
- Re: Speed issue...
- From: Francois Malan
- Re: Speed issue...
- From: Atmapuri
- Speed issue...
- Prev by Date: Re: Programmatically get OLDDB Version (and other properties)
- Next by Date: Re: Speed issue...
- Previous by thread: Re: Speed issue...
- Next by thread: Re: Speed issue...
- Index(es):
Relevant Pages
|