Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Takes too long to SEEK
Message
De
05/12/1997 17:28:36
 
 
À
05/12/1997 16:41:26
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00064114
Message ID:
00064161
Vues:
29
>>>>I have a search form that uses the ingrid control in a grid to incrementally search members in out database. (125,000 records in the member table)
>>>>The form works beautifully except for one thing: When the pointer is positioned on a record that begins with a letter somewhere in the middle of the list (Doesn't begin with 'A'), Searching for a name beginning with 'A' gives incorrect results:
>>>>type: "ABART"
>>>>positions the pointer on "BART"
>>>>The reason this happens is that the control starts the search string over after a certain timeout value is elapsed, and searching on 'A' takes long enough for the search to time out and start the string over. I can adjust the timeout value (it is currently 1.5 seconds) to accomodate the problem, but that would defeat the purpose of the timeout.
>>>>The strange thing is it only takes too long with the letter 'A', and no other letters.
>>>>
>>>>-OK I just did some testing. From the command window, 'A' takes just as long to search as the other letters. This leads me to believe that the delay is the grid repositioning itself.
>>>>I have found a user workaround and that is to type 2 'A's when searching for a name that starts with 'A'. The first 'A' lets the search time-out and the second 'A' is searched succesfully.
>>>>The delay seems to be only when the grid has to go to the very top, not any other position.
>>>>This inconsistency is pretty odd.
>>>>Does anybody know a way around it?
>>>Hi,
>>>Do you have an index tag on the field. With cSeekTag set to tagname, ingrid and grid refresh is instant no matter how many recs you have and what you search.
>>>Cetin
>>
>>Cetin, if it s within your means, please try this situation and report your results. I use the Ingrid control on well over 20 forms, and the search result time is NOT the same depending on number of records. I am well aware that I need indexes on appropriate fields, your assumption that grid refresh rate doesn't change is simply wrong.
>Hi,
>Just tried it again on 178908 rec table. First, last, middle recs were instant and grid refreshed instantly as well.
>Cetin

Did you test with an index set on the table?

Thanks for trying to help me diagnose.
I have done some further testing myself.
New form (base form). New grid (base grid)
add table to DE (125,000 records, 86 fields) with order (this is important) set to main index
set grid's datasource to table.
added three buttons to the form:

button1.click:
temp = seconds()
go top
thisform.mygrid1.refresh
thisform.caption = str(seconds()-temp, 5,2)

button2.click:
temp = seconds()
go bottom
thisform.mygrid1.refresh
thisform.caption = str(seconds()-temp, 5,2)

button3.click:
temp = seconds()
go 60000
thisform.mygrid1.refresh
thisform.caption = str(seconds()-temp, 5,2)

clicking button 2 changes the form's caption to .04
clicking button 3 changes the form's caption to .01
clicking button 2 again changes the form's caption to .02
clicking button 1 (go to top of table) changes the form's caption to 2.36

Any idea what's going on? anybody?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform