Normal Topic @GlobalValue( ) variable Vs. one more element (Read 1138 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
@GlobalValue( ) variable Vs. one more element
Apr 5th, 2005 at 4:31pm
Print Post Print Post  
I would like to know which one would be more efficient, to have @globalvalue( ) variables or to make two additional elements.

I have an element, in a layout, which gathers the string of key elements of clients registered to be served today and in other layout of other database in the same application, I have an element that collects the string of the same keyelement values of clients already served today. Filtering the one from the other, gives me the list of clients waiting to be served, ofcourse I have to use x-family function with this approach.

Now instead of using elements, I can store this values in @Globalvalue ( )  variables and avoid having two elements. Which approach  uses less resources, faster and more efficient?
« Last Edit: Apr 5th, 2005 at 6:07pm by Bharat_Naik »  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: @GlobalValue( ) variable Vs. one more element
Reply #1 - Apr 5th, 2005 at 7:22pm
Print Post Print Post  
Could you also write the info to a text file and use @Insert() or FileReadLn() when needed?

How does that measure in speed to other options mentioned?
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @GlobalValue( ) variable Vs. one more element
Reply #2 - Apr 5th, 2005 at 7:26pm
Print Post Print Post  
Quote:
I would like to know which one would be more efficient, to have @globalvalue( ) variables or to make two additional elements.

I have an element, in a layout, which gathers the string of key elements of clients registered to be served today and in other layout of other database in the same application, I have an element that collects the string of the same keyelement values of clients already served today. Filtering the one from the other, gives me the list of clients waiting to be served, ofcourse I have to use x-family function with this approach.

Now instead of using elements, I can store this values in @Globalvalue ( )  variables and avoid having two elements. Which approach  uses less resources, faster and more efficient?



GlobalValues and variables are far more efficient than elements.
1. It's faster to get the value.
2. The value is only stored once, rather than taking up resources for each and every record in your database. Even if you don't put any data in a field, it still requires a "placeholder" in each record, just in case you do.
  

- Hammer
The plural of anecdote is not data.
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: @GlobalValue( ) variable Vs. one more element
Reply #3 - Apr 5th, 2005 at 7:30pm
Print Post Print Post  
My guess would be @Globalvalue( ) should be the fasted, having not to open anything external or read anything external. Writing to .txt file could not be that far behind. You definitely gave me third option to work with. Thanks.  I believe, making two extra-elements and lookup the value and filter it should be the least efficient. Unfortunately, I do not have any benchmark to test it, so will go by what the experts say.
  
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: @GlobalValue( ) variable Vs. one more element
Reply #4 - Apr 5th, 2005 at 7:45pm
Print Post Print Post  
Did not see Erika's before I posted my earlier note but that confirms my guess.
  
Back to top
 
IP Logged