Simple Development question

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Simple Development question

Postby ebrandt » Tue Nov 09, 2004 7:28 pm

This is the performance differernce this creating a calculation stored, unstored or on the fly using variables. I am trying to determine when is the best case to use the correct scenario. What are some typical examples when these stratgies are used.
ebrandt
 
Posts: 590
Joined: Tue Mar 30, 2004 6:54 pm
Location: largo, fl

Postby bcusick » Tue Nov 09, 2004 7:32 pm

This is "Bob's Personal Theory":

1) Used STORED calcs only when you need to search or sort by a calculated value.

2) Use UN-STORED for everything else.

Bob
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby ebrandt » Tue Nov 09, 2004 7:37 pm

Bob,
Thanks for the hep. I have alot of stored calcs, when I start running reports I figured I can run the query based on several tables, and display as html, without having to add more calculation coding.

I guess my main question is, is there a disadvantage having stored calcs?

Thanks,
Erich
ebrandt
 
Posts: 590
Joined: Tue Mar 30, 2004 6:54 pm
Location: largo, fl

Postby bcusick » Tue Nov 09, 2004 7:41 pm

Stored calcs have to make a database call (query) to update the value.

Unstored do not (held in memory only).

Unstored = faster.

:-)

Bob
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 42 guests

cron