On 2014-07-29 20:06, Sytze de Boer wrote:
Everyone, thank you for your help.
My old routine took point 419 seconds, the new routine point 350
This leads to my next question
Which of the two methods is *better* (i.e. used by experts)
1 Update, set etc
2 Scan/endscan with replace
3 set a relation and replace all
I'd say your best design is one that gives satisfactory performance and
is easy to work on for you or future developers should you kick the
bucket and they take over.
By *better*, I'm referring to speed and record/file locking.
Oh, well, in that case, I'm thinking since you have to replace all
values in that one table, my way is the best as it scans the table yet
uses Rushmore optimization in the UDF to quickly get the SUM you want
(provided there's an index on the WHERE clause field).
:-)
I never liked the Herculean/Superman SQLs that had tons of nesting in
them. They're often a nightmare to debug and/or keep when changes
needed.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.