Sprocs vs. inline calculations

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Sprocs vs. inline calculations

    Hi Folks -

    I am looking to get some thoughts on either best practices or speed
    optimization ideas when it comes to generating a report that includes a lot of
    calculations based upon records in a table.

    I am wondering should I do this inline or all the calculations within a stored
    proc?

    To give a general idea... I have a yearly report that needs to calculate
    totals based upon activity within a particual month.
    January X Y Z
    February X Y Z
    etc...

    Grand Total X Y Z

    Thanks,

    Doug

    Fordian-Slip Guest

  2. Similar Questions and Discussions

    1. Calculations not working
      Hi All, getting frustrated. I've done forms with calculations (invoice sheets etc.) and they worked well in the past. I can't seem to get the...
    2. Sprocs in Oracle vs. Other RDBMS
      I was recently part of a Macromedia online training session, and someone (I'll keep names out of it for now) made a comment that CFMX and Oracle...
    3. [PHP-DEV] [PATCH] inline -> static inline
      On Fri, 15 Aug 2003, Jason Greene wrote: Thanks, I have applied the patch. The CVS reorg did not affect karma assignment. - Sascha
    4. column calculations
      create a computed column to add year to the existing column See following example. CREATE TABLE dbo.t2 ( dt datetime NULL, next_yr AS...
    5. calculations and tables
      I'm relatively new to Access, and I'm in the process of creating a few simple databases to manage our inventory. This database is going to involve...
  3. #2

    Default Re: Sprocs vs. inline calculations

    you should use a sproc for everything

    but i would just use plain sql over udf's or overly complex case when
    then whenever you can

    -aaron

    dbahooker@hotmail.com Guest

  4. #3

    Default Re: Sprocs vs. inline calculations

    I would stored the aggregated values for past months in a Historical table
    And join that table with the current month calculations so that you don't have
    to recalculate the same static data every time someone requests this report
    If you create a Stored Proc the query plan will be reused by the optimizer

    [url]http://sqlservercode.blogspot.com/[/url]

    SQLMenace Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139