Board index » delphi » The Locate method seems not to use the Index in the first call
Gustavo Laet Gomes
![]() Delphi Developer |
Sat, 29 May 2004 22:23:43 GMT
|
Gustavo Laet Gomes
![]() Delphi Developer |
Sat, 29 May 2004 22:23:43 GMT
The Locate method seems not to use the Index in the first call
Hi
We've been making some testing with the Locate method and it seems to have a If you put a TIBTable in a form, opening a table with 10,000 records, in the After the first call in the Locate method, other calls are faster (2 Is there any solution for this? |
Team
![]() Delphi Developer |
Sat, 29 May 2004 22:54:36 GMT
Re:The Locate method seems not to use the Index in the first callQuoteGustavo Laet Gomes wrote: retrieving the records locally. The next two calls only did local scans of the data. Quote> Is there any solution for this? Jeff Overcash (TeamB) (Please do not email me directly unless asked. Thank You) The fool escaped from paradise will look over his shoulder and cry Sit and chew on daffodils and struggle to answer why? As you grow up and leave the playground Where you kissed your Prince and found your frog Remember the jester that showed you tears, the script for tears. (Fish) |
Gustavo Laet Gome
![]() Delphi Developer |
Sat, 29 May 2004 23:48:05 GMT
Re:The Locate method seems not to use the Index in the first callThank you Jeff. That was my only answer since Locate would take the same time as Last. But "Locate uses the fastest possible method to locate matching records. If the I'm definatly not defending the Locate method. The only thing I want is to "Jeff Overcash (TeamB)" <overc...@onramp.net> escreveu na mensagem Quote
|
Team
![]() Delphi Developer |
Sun, 30 May 2004 00:12:18 GMT
Re:The Locate method seems not to use the Index in the first callQuoteGustavo Laet Gomes wrote: fetching the records across the wire, not the non use of the index. Even if the index was used to find the last record, all the records before it would still need to be retrieved to maintain the correct ordering of the result set thus the main delay you are seeing would still occur. TIBTable does do a quick query of the DB to see if the record even exists and exits quickly if it does not. Quote> So, do you know how can I use the index to search for records in a -- |
Jorge Alvare
![]() Delphi Developer |
Sun, 30 May 2004 00:31:42 GMT
Re:The Locate method seems not to use the Index in the first callThis paragraph does apply to BDE datasets only. Because IBX <> BDE, there's no way to make an indexed search on open TIBDataSets. You should always try to get small datasets from the server (using a 'where' clause in the SelectSQL property) and Locate should work OK. Usually, what I do is to change the SelectSQL property "on the fly" to See http://ib.freeservers.com/ for more info on IBX. HTH, -Jorge Quote> That was my only answer since Locate would take the same time as Last. But |
Team
![]() Delphi Developer |
Sun, 30 May 2004 02:38:13 GMT
Re:The Locate method seems not to use the Index in the first callQuote"Jeff Overcash (TeamB)" wrote: uses an index. -Craig -- |
Martijn Tonie
![]() Delphi Developer |
Sun, 30 May 2004 21:29:27 GMT
Re:The Locate method seems not to use the Index in the first call"Craig Stuntz (TeamB)" <cstuntz@no_spam.vertexsoftware.com> schreef in Quote
Paradox, right? |
Team
![]() Delphi Developer |
Sun, 30 May 2004 22:55:57 GMT
Re:The Locate method seems not to use the Index in the first callQuoteMartijn Tonies wrote: -- |
1. Help: class method not calling correct descendent Create method
2. TDBEDataSet.Locate does not seem to work
3. delete method seems not to work properly ...
4. Locate function locates on wrong record first time
5. Locate function locates on wrong record first time
6. Locate not locating and findkey not finding
7. ADOExpress and locate method not working
8. Using Locate method in Delphi 2