Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
Slow Locate |
Wed, Jan 25 2006 1:45 AM | Permanent Link |
Dave | Hi
I've been profiling my app to try and speed it up and was surprised to find one of the slowest part of my applications was due to a locate that is frequently used: bFound:=tblABC.Locate(tblABCDate.FieldName+';'+tblABCGroup.FieldName,vararrayof([EntryDate,iGroup]),[]); tblABCDate is a Date field with a secondary index tblABCGroup is an Integer field with a secondary index Each locate is taking 2 seconds on average when tested with a table of 1300 records. (I checked with DBSys to ensure both fields are shown as "Optimized", and even tried reparing and optimizing the table. Also the table is not displayed anywhere) DBISAM 3.30, d5.01 Any ideas what might cause such a slow locate? TIA Dave |
Wed, Jan 25 2006 8:14 AM | Permanent Link |
Sean McCall | Dave,
Have you tried a single index of Date + Group or Group + Date. The locate should then do the equivalent of a FindKey, but if not, a FindKey would be the fastest way to move to the record. Sean Dave wrote: > Hi > > I've been profiling my app to try and speed it up and was surprised to find one of the slowest part of my applications was due to a locate that is frequently used: > > bFound:=tblABC.Locate(tblABCDate.FieldName+';'+tblABCGroup.FieldName,vararrayof([EntryDate,iGroup]),[]); > > tblABCDate is a Date field with a secondary index > tblABCGroup is an Integer field with a secondary index > > > Each locate is taking 2 seconds on average when tested with a table of 1300 records. > > (I checked with DBSys to ensure both fields are shown as "Optimized", and even tried reparing and optimizing the table. Also the table is not displayed anywhere) > > DBISAM 3.30, d5.01 > > > Any ideas what might cause such a slow locate? > > > TIA > > Dave > |
Wed, Jan 25 2006 6:54 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dave,
<< I've been profiling my app to try and speed it up and was surprised to find one of the slowest part of my applications was due to a locate that is frequently used: bFound:=tblABC.Locate(tblABCDate.FieldName+';'+tblABCGroup.FieldName,vararrayof([EntryDate,iGroup]),[]); tblABCDate is a Date field with a secondary index tblABCGroup is an Integer field with a secondary index Each locate is taking 2 seconds on average when tested with a table of 1300 records. >> It sounds like it is using brute-fore for the search. How long does a filter of: DateField='DateConstant' and IntegerField=IntegerConstant take to execute on the same table ? -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, September 20, 2024 at 05:39 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |