Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 17 of 17 total
Thread Speeding up my TwwDBLookupCombo
Tue, Jan 8 2008 9:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pat,

<< I am using a TwwDBLookupCombo and the lookup table (and all other tables)
is on a file server. It works fine but one of the tables has 25,000 records
and the auto complete function is rather slow. >>

Are you sure that the lookup combo is able to use an index for the searching
?  Usually, a performance issue indicates that an index isn't being used.
Make sure that there is a case-insensitive index available for the field
that you're searching on in the lookup combo.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jan 9 2008 5:13 AMPermanent Link

Chris Erdal
Roy Lambert <roy.lambert@skynet.co.uk> wrote in news:B0C0C948-3075-4934-
A556-1E8F91A3FC50@news.elevatesoft.com:

>>If a maintenance form updates something in a
>>lookup list it will automatically refresh the table making the updated
>>list available immediatly to all calling forms.
>
> This bit interests me - how do you do it?

Roy,

I do this in a single-user app by inheriting all my dataforms from one
that has a TStringlist called RefreshList (filled in the onCreate event
handler in each inherited form), and a method that refreshes all lookups
(TDBISAMQuery) on the DataModule whose SQL contains a reference to any
table in RefreshList, called by the default AfterDelete and AfterPost
event handlers for the main table on the form.

Wouldn't be much use for multi-user, though.
--
Chris
(XP-Pro + Delphi 7 Architect + DBISAM 4.25 build 4 + EDB 1.04 build 3)

Wed, Jan 9 2008 7:43 PMPermanent Link

Pat
Alex,

>We use Woll2Woll components extensively and as
>long as you have an index on the item that is being auto-completed, I have
>found it works extremely quickly.  Have you checked that the table is
>indexed on the field being displayed in the drop-down?

The TDBISAMTable I use as the lookup has 3 fields:
- JobID
- JobCode
- JobDescription

Both JobID & JobCode are indexes

The TwwDBLookupCombo uses/displays fields JobCode & JobDescription. I
type the JobCode for the AutoComplete. For the TwwDBLookupCombo
LookUpField and DataField I use JobID.

If I cut down the number of LookUp records from 25,000 to 5,000 there
is no noticeable time delay.
Wed, Jan 9 2008 9:55 PMPermanent Link

Pat
Tim,

>Make sure that there is a case-insensitive index available for the field
>that you're searching on in the lookup combo.

The table index I am searching on has a Character Case of 'Upper
Case'.

Pat
Thu, Jan 10 2008 10:55 AMPermanent Link

"David Farrell-Garcia"
Roy Lambert wrote:

> David
>
> > If a maintenance form updates something in a
> > lookup list it will automatically refresh the table making the
> > updated list available immediatly to all calling forms.
>
> This bit interests me - how do you do it?
>
> Roy Lambert

Hi Roy.  I take a really simple approach. When a LookupDataModue is
created the first time it is availble anywhere and stays in memory.
Every Maintenance form uses it's associated LookupDataModule, so after
changes to a maintenance form are applied it simply refreshes the
lookup table, which is then immediatly available to any calling form.

--
David Farrell-Garcia
Whidbey Island Software, LLC
Thu, Jan 10 2008 10:58 AMPermanent Link

"David Farrell-Garcia"
I forgot to add that I keep the last ID inserted in a global location
that is queried each time a user references a lookup. If the new ID is
not there it will refresh the lookup table, insuring that each user has
the latest lookup data.

--
David Farrell-Garcia
Whidbey Island Software, LLC
Thu, Jan 10 2008 5:50 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Pat,

<< The table index I am searching on has a Character Case of 'Upper Case'.
>>

That's not quite the same thing.  What you need to make sure is that the
index itself is marked as case-insensitive if the indexed field(s) is/are
string fields.  That's the only way a lookup combo will use the index to
optimize the search.

--
Tim Young
Elevate Software
www.elevatesoft.com

« Previous PagePage 2 of 2
Jump to Page:  1 2
Image