Re: Do UDFs slow down Stored Proc execution?
From: John Kotuby (jkotuby_at_snet.net)
Date: 11/17/04
- Next message: Mike MacSween: "Re: RADiest Client for SQL Server"
- Previous message: Prasad Koukuntla: "Re: Query numeric varchar data"
- In reply to: David Gugick: "Re: Do UDFs slow down Stored Proc execution?"
- Next in thread: Adam Machanic: "Re: Do UDFs slow down Stored Proc execution?"
- Reply: Adam Machanic: "Re: Do UDFs slow down Stored Proc execution?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Nov 2004 14:00:43 -0800
Thanks David,
Tuning the queries of course would be the correct thing to do. The
checkwriter is just a small part of a much larger intricate system. In
fact tuning probably would have been advisable while we were in the
early stages of creating the large business app that we find ourselves
with now. What we have done is converted a DOS app (Clipper) that had
originated in 1983 and evolved over time. Believe it or not, the DOS app
is still handling systems with over 500,000 invoices. The SQL system
works beautifully from a business logic perspective. But now we find it
performing slower than we had originally envisioned.
I have been plowing through the Microsoft SQL Server 2000 Performance
Tuning Tech Reference trying to find a place to start (don't laugh too
loud). Our execution plan consisted of writing copious code logic,
creating indexes and expecting SQL Server to simply handle it better
than Clipper did. After all, that approach worked well in the "desktop"
RDBMS.
For example, one stored proc that handles the bulk of all business
transactions for the system consists of over 1000 lines of code. More
than 40 variables are declared. It handles the decision making for 22
different invoice and cash related transactions such as Posting, Cash
Entry, Distribution, Adjustment, PrePay, Reversals, etc. and makes calls
to other procs that make entries and balance adjustments in the
Accounting, Invoicing and Order tables.
I don't know if you actually want to see that proc. I don't think anyone
has ever posted 1000 lines of code for comment. What I am beginning to
suspect is that this large proc should be broken down into a hierarchy
of smaller procs that SQL Server can digest more readily. How does one
"tune" such a large procedure?
Deconstructing an intricate system that is currently handling business
logic correctly is a daunting task. But if that is the only remedy then
it is time to swallow the bitter pill.
John P. Kotuby
IT Manager
Statware, Inc.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Mike MacSween: "Re: RADiest Client for SQL Server"
- Previous message: Prasad Koukuntla: "Re: Query numeric varchar data"
- In reply to: David Gugick: "Re: Do UDFs slow down Stored Proc execution?"
- Next in thread: Adam Machanic: "Re: Do UDFs slow down Stored Proc execution?"
- Reply: Adam Machanic: "Re: Do UDFs slow down Stored Proc execution?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|