Keith Chisarik
|
|
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
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
Jeesh, you guys probably never even used a punch card!
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
I did! With FORTRAN.
|
|
|
Ben Hayat
|
|
Group: Forum Members
Posts: 374,
Visits: 1.2K
|
I did!
With FORTRAN. [Crazy] IBM 360/370 Univac 1108 Fortran Cobol Basic Assembly JCL Algol . . .
..ßen
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
What's a punch card?
|
|
|
Steve L. Taylor
|
|
Group: StrataFrame Developers
Posts: 40,
Visits: 91
|
1983 - Keith was 10, Trent was 7, Ben was 2 -- ok I am a little older than you guys -- by a freaking lot. I was 31 in 1983. Either y'all are precocious or maybe I am mature. Actually, I started on punched cards and tape. At one time I could read Baudot... I think Ben and Trent are counting the days until the nursing home comes and gets me...
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Steve L. Taylor (04/03/2007)
1983 - Keith was 10, Trent was 7, Ben was 2 -- ok I am a little older than you guys -- by a freaking lot. I was 31 in 1983. Either y'all are precocious or maybe I am mature. Actually, I started on punched cards and tape. At one time I could read Baudot... I think Ben and Trent are counting the days until the nursing home comes and gets me... I was 19. But I'm not worried... I've decided to live 120 years, so, nothing to worry about.
|
|
|
Ben Hayat
|
|
Group: Forum Members
Posts: 374,
Visits: 1.2K
|
Steve L. Taylor (04/03/2007) 1983 - Keith was 10, Trent was 7, Ben was 2 -- ok I am a little older than you guys -- by a freaking lot. I was 31 in 1983.
Either y'all are precocious or maybe I am mature. Actually, I started on punched cards and tape.At one time Icould read Baudot...
I think Ben and Trent are counting the days until the nursing home comes and gets me...Steve, it's great to see you active in design and development. And that's what keeps everyone young...Staying on top of things. Hope to see you when I get to your class!
..ßen
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Ben Hayat (04/03/2007)
I did!
With FORTRAN. [Crazy] IBM 360/370 Univac 1108 Fortran Cobol Basic Assembly JCL Algol . . .  Hey, Ben. I walked the same path!
|
|
|
Ben Hayat
|
|
Group: Forum Members
Posts: 374,
Visits: 1.2K
|
Ivan George Borges (04/03/2007)
Ben Hayat (04/03/2007)
I did!
With FORTRAN. [Crazy] IBM 360/370 Univac 1108 Fortran Cobol Basic Assembly JCL Algol . . .  Hey, Ben. I walked the same path! We should definitely talk about it when we are having Beer "On" Trent.
..ßen
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
OK, back to business... Keith, if you change the column that is the primary key, you'll have to change it back after you are done with your loop in order to add a new record. Also, when you set the PK column back to where it actually is the primary key, you'll also need to set the auto-increment on the column... seed of -1 and value of -1.
|
|
|
Greg McGuffey
|
|
Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
I'm going to throw out another approach. Is it possible to just create a fill method that returns just the records you want? You must be determining somehow which records to seek, so why not just use that criterion in the Where clause. You could also do a sort (on SQL, not in BO). Then you just loop through the returned records and do whatever you have to do.
|
|
|