forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need to speed up my search....

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Mon Dec 19, 2005 8:24 pm    Post subject: Need to speed up my search.... Reply with quote

I have a program that does a customer look-up by entering some search term or based on the called ID. It builds a list of records with the match and then a bunch of other stuff happens. There are a few thousand customer records and the searches can take a few seconds. I want it faster. Here is the code at the search point:

Code:
:BUTTON1BUTTON
REM FIRST
    DIALOG SET,LIST2,Searching...
   DIALOG CURSOR,WAIT
    list clear,13
    LIST SEEK,9,0
    %%SEARCHME = @DLGTEXT(EDIT7)
REPEAT
  %M = @MATCH(9,%%SEARCHME)
  IF @EQUAL(%M,1)
     LIST ADD,13,@ITEM(9)
  END
  %%TEMP = @NEXT(9)
UNTIL @NOT(@OK())


And here is the header and 1 record sample from the data:

ID|PGRPCOUNT|LOGIN|PW_EMAIL|PASSWORD|SHIP_FNAME|SHIP_LNAME|SHIP_EMAIL|SHIP_COMP|SHIP_PHONE|SHIP_FAX|SHIP_ADDR|SHIP_CITY|SHIP_STATE|SHIP_ZIP|SHIP_CNTRY|BILL_FNAME|BILL_LNAME|BILL_EMAIL|BILL_COMP|BILL_PHONE|BILL_FAX|BILL_ADDR|BILL_CITY|BILL_STATE|BILL_ZIP|BILL_CNTRY
XXX1XXX|0|marktrubo|mark@directglove.com|mypassword|Mark|Trubowitsch|mark@directglove.com|Direct Glove|800-434-0012|800-434-0013|485-18 South Broadway|Hicksville|NY|11801|US|Mark|Trubowitsch|mark@directglove.com|Direct Glove|800-434-0012|800-434-0013|485-18 South Broadway|Hicksville|NY|11801|US

The odd thing is if the search is on some term with lots of matches, it is really quick, like I just did one that had 3,106 matches and it took like 1 second. But if there are only a few matches, it takes like 30 seconds.

What can I do to speed this up? Can I do soemthing with the String DLL or something else?

Thanks!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Dec 20, 2005 12:29 am    Post subject: Reply with quote

Seems like String.dll's pending MatchLines function would do the trick -- it was mentioned here:

http://forum.vdsworld.com/viewtopic.php?t=3571&highlight=matchlines

Hey Dread... any possability of a String.dll update for X-mas?

Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Dec 20, 2005 9:31 am    Post subject: Reply with quote

Just sent ya a mail stating the possibilities.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Dec 20, 2005 11:28 am    Post subject: Reply with quote

I did what you said -- now I need what you promised! Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Dec 20, 2005 1:19 pm    Post subject: Reply with quote

Didn't you get It Question Shocked

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Dec 20, 2005 1:27 pm    Post subject: Reply with quote

Yip -- already playing with it -- it is FAST on the match!!!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Dec 20, 2005 2:01 pm    Post subject: Reply with quote

Great.

Please bear in mind that this is a beta, so report any instability etc.

If your source file isn't changing all the time, you could also consider the new FileOpsRes range of functions.
FileOpsRes will keep the file loaded between function calls and thus it will be much faster when doing repeated
operations on the same file.

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
MarkTrubo
Contributor
Contributor


Joined: 27 May 2001
Posts: 148
Location: Long Island, NY

PostPosted: Tue Dec 20, 2005 8:13 pm    Post subject: Reply with quote

That option looks cool -- I will play with it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Wed Dec 21, 2005 1:01 pm    Post subject: Reply with quote

Ah! Ha! That is a feature that seem to interest me ! Wink

Can't wait for the new version!
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group