Hot Topic (More than 10 Replies) Speed of Xlookup (Read 1606 times)
Alchemist
Member
*
Offline


No personal text

Posts: 8
Joined: Feb 5th, 2004
Speed of Xlookup
Feb 5th, 2004 at 3:48pm
Print Post Print Post  
With QA Xlookup was instantaneous - enter the PIN and the complete F Name, M, L Name, Add1, Add2, City, ST, and Zip was on the screen.

Sesame takes forever. I've tried to split the look up data into smaller files, made them read only, used the original DTF file. Nothing seems to speed this process up. Seach and update is out of the question.

Does anyone have another way of speeding this up? ???
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Speed of Xlookup
Reply #1 - Feb 5th, 2004 at 3:57pm
Print Post Print Post  
Internal lookup (looking up data in the same application) is supposed to be faster. Consider to merge the related databases in one application.  This is available in Sesame thorugh Application Utility Menu Please let us know if this makes significant difference. Is there anything else we can do to make it faster?
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Speed of Xlookup
Reply #2 - Feb 5th, 2004 at 4:33pm
Print Post Print Post  
I just tested the internal lookup with zipcode application that comes with samples and found lookups to be instant. Mind you, the zipCode is a 43,042 records, so it is very big.

What did I do?

made another form with

zipCode
City
State

by placeing Zipcode value, I made it xlookup value for City and State.  xlookups were completed just in an instant.  
« Last Edit: Feb 5th, 2004 at 6:01pm by Bharat_Naik »  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Speed of Xlookup
Reply #3 - Feb 5th, 2004 at 4:35pm
Print Post Print Post  
Alchemist,

Bharat is correct that all the databases being in one application will help. I have also found that after the first search after opening the application it speeds up considerably.

How slow is your lookup by actual time?

I have had the situation were I had other programming in elements executing incorrectly that affected the speed of my lookup. I ended up having to copy the dsr file and deleted each piece of code until I found my mistake that was affecting my lookup.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Speed of Xlookup
Reply #4 - Feb 5th, 2004 at 4:43pm
Print Post Print Post  
Yes, you can speed up the XLookup - without making it internal. Using an external XLookup, you can put an XLookup in the GLOBAL CODE section. It will run when the form is opened. It can even be a "bad" Xlookup, using an non-existent LE name in the key field. Just make sure it uses the same .db file as the "real" XLookup that will run later. Then, put the "real" XLookup in the event where it is really supposed to go.

The XLookup in GLOBAL CODE will run first, so the form will take a few moments to open, but subsequent XLookups to the same .db file will be much much faster.

In general, the first XLookup to any .db file will be slow. Subsequent XLookups will be as fast as internal XLookups. So this technique works by moving the first XLookup "out of the way".

This applies to any of the "X" commands.

As an example, try this in Customers.db:

------------------------------------
in GLOBAL CODE:

var str as string

str = @XLookup("c:\Sesame\Data\Samples\ZipCode.db", "Hiram", "xxxxxCity", "Zip Code")
writeln(str)

------------------------------------
in Company ON EXIT

var str as string

str = @XLookup("c:\Sesame\Data\Samples\ZipCode.db", "Hiram", "City", "Zip Code")
writeln(str)

------------------------------------

The XLookup in in GLOBAL CODE will run just before the form opens, effectively "internalizing" the ZipCode.db. Then when you exit the Company LE, the second XLookup will run nearly instanteously.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Speed of Xlookup
Reply #5 - Feb 5th, 2004 at 6:32pm
Print Post Print Post  
How does internal xlookups in Sesame compares to xlookups in Q&A as far as speed is concerned? With indexed fields in Q&A, we, at times, have problems with corruption. Is that the reason, why Sesame does not have indexed fields?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Speed of Xlookup
Reply #6 - Feb 5th, 2004 at 10:27pm
Print Post Print Post  
Quote:
How does internal xlookups in Sesame compares to xlookups in Q&A as far as speed is concerned? With indexed fields in Q&A, we, at times, have problems with corruption. Is that the reason, why Sesame does not have indexed fields?


The speed depends on a lot of factors. In a XLookup the speed is dependent on the field types, the total size of the application, and the overhead to data ratio. If you have two Sesame applications that are about the same total size, but one has fewer fields or records and more data per field or record - it will go faster.

Comparing Sesame to Q&A for speed of XLookup is dependent on the characteristics of the applications involved. On some, Sesame will go faster, on others Q&A will go faster - based on the arrangement, type, and size of the data.

If you were to do head to head timing tests, you will need a very wide variety of applications and then average the results.

There are several reasons we do not use indexes, corruption is one of them. The primary reason is to keep things as simple and homogeneous as possible. That way, if we discover that we need to optimize any particular operation, there isn't a specialized optimization technique already in place that might be in the way or too inflexible. Its better to keep things very simple and apply complexity where we need it - as the need is proven.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
alex_smits
Member
*
Offline


No personal text

Posts: 27
Location: Arnhem, The Netherlands
Joined: Dec 15th, 2003
Re: Speed of Xlookup
Reply #7 - Feb 6th, 2004 at 8:14am
Print Post Print Post  
Hello i in the Netherlands use a zipcode databse with 608387 records, in Q&A this was no problem to find a adress - city with a xlookup in sesame it's take different minutes.  Cry
  
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Speed of Xlookup
Reply #8 - Feb 6th, 2004 at 9:12am
Print Post Print Post  
Consider merging the related databases in one application.  This is available in Sesame thorugh Application Utility Menu Please let us know if this makes significant difference.

When your xlookup is internal (databases in the same application), it is as fast as in Q&A as per my experience.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Speed of Xlookup
Reply #9 - Feb 6th, 2004 at 1:37pm
Print Post Print Post  
You can also put in one extra XLookup in GLOBAL CODE, that will force the ZipCode application to become "internal" and all subsequent XLookups will be much faster - as outlined above.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
alex_smits
Member
*
Offline


No personal text

Posts: 27
Location: Arnhem, The Netherlands
Joined: Dec 15th, 2003
Re: Speed of Xlookup
Reply #10 - Feb 6th, 2004 at 6:00pm
Print Post Print Post  
Wenn i merge the database it's take's a lote of time to open the database, i only use a xlookup to a large database wenn i add data to my database. The large database will furder never use. It could be nice if there is a possible to index the large database, by example like dbase. wenn there the index is corrupted, you remove the index file and dbase makes a new index file.

Alex
  
Back to top
IP Logged