seek() slowness


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I have some code that loops through about 1/4 of a million records, it is taking a very long time (I stopped it after 15 minutes and it wasn't close to done).



I took out all the processing in the loop so that all it was doing was the loop with a single seek() and it was still slow. I replaced the seek() with "if 1 =2 then" and it went as expected (about 20 seconds).



I am seek()ing against a single integer field that I have an index on in SQL. Help????



Code:

searchstr = "rent_RPMrecnum = " & "'" & currow("record_number") & "'"

'If Me.RentitemsBO1.Seek(searchstr) Then

‘do nothing

Else

‘still do nothing for testing purposes

End if





Thanks.










Keith Chisarik
Replies
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Part of the problem is that the volume isn't in SQL exclusively, I have to read a table of roughly 1/4 million records from a Dataflex table via ODBC (seems all I do these days is read old data but thats another story).



I am trying to create a sync method that will mirror the table in SQL for me to program against. So for each of the 250,000 records I need to either add a record or check the fields to see of they have been updated. It is the initial "look for this record" that is taking the time. I think what you are saying here is that I want to create a SQL proc to search for the record, not rely in the BO seek() method since ADO wasnt built to do that... do I have it right?



Thanks everyone for your input and time. For the time being I have abandoned doing the whole table at once, and gone for only updating the records the user calls for at any given time, I will eventually need to be able to "refresh" the entire SQL table against the live Dataflex datasource for reporting though.

Keith Chisarik
Ben Hayat
Ben Hayat
Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)Advanced StrataFrame User (946 reputation)
Group: Forum Members
Posts: 374, Visits: 1.2K
Dataflex table




Good old DATAFLEX Smile

Are they still around? I used it from 1983 to 1985. It's proprietary data file format (back then) was very solid.

Are they using Btrieve now? Or Pervasive SQL?

..ßen
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Keith Chisarik - 19 Years Ago
Greg McGuffey - 19 Years Ago
Keith Chisarik - 19 Years Ago
StrataFrame Team - 19 Years Ago
Keith Chisarik - 19 Years Ago
Keith Chisarik - 19 Years Ago
StrataFrame Team - 19 Years Ago
StrataFrame Team - 19 Years Ago
Keith Chisarik - 19 Years Ago
Keith Chisarik - 19 Years Ago
Keith Chisarik - 19 Years Ago
Keith Chisarik - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Ben Hayat - 19 Years Ago
Greg McGuffey - 19 Years Ago
Greg McGuffey - 19 Years Ago
Keith Chisarik - 19 Years Ago
Ben Hayat - 19 Years Ago
Keith Chisarik - 19 Years Ago
Keith Chisarik - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Greg McGuffey - 19 Years Ago
                     I did! With FORTRAN. :crazy:
Ivan George Borges - 19 Years Ago
                         [quote]I did!

With FORTRAN. [Crazy] [/quote]

IBM...
Ben Hayat - 19 Years Ago
                             What's a punch card? :D
StrataFrame Team - 19 Years Ago
                                 1983 - Keith was 10, Trent was 7, Ben was 2 -- ok I am a little older...
Steve L. Taylor - 19 Years Ago
                                     [quote][b]Steve L. Taylor (04/03/2007)[/b][hr]1983 - Keith was 10,...
Ivan George Borges - 19 Years Ago
                                     [quote][b]Steve L. Taylor (04/03/2007)[/b][hr]1983 - Keith was 10,...
Ben Hayat - 19 Years Ago
                             [quote][b]Ben Hayat (04/03/2007)[/b][hr][quote]I did! With FORTRAN....
Ivan George Borges - 19 Years Ago
                                 [quote][b]Ivan George Borges (04/03/2007)[/b][hr][quote][b]Ben Hayat...
Ben Hayat - 19 Years Ago
                                     OK, back to business... Keith, if you change the column that is the...
StrataFrame Team - 19 Years Ago
                                         I'm going to throw out another approach. Is it possible to just...
Greg McGuffey - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search