cfquery vs cfstoredproc

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

  1. #1

    Default Re: cfquery vs cfstoredproc

    In my experience, the SPs execute a little faster then the queries. you can use
    to test on your own. <CFSET start=GetTickCount()> ... some CFML code ...
    <CFSET end=GetTickCount()> <CFSET executiontime=end-start>

    JRock Guest

  2. Similar Questions and Discussions

    1. Possible to use cfprocresult from a previous cfstoredproc in a cfquery?
      I'm new to ColdFusion and I want to know if it is possible to use the cfprocresult value from a previous cfstoredproc in a cfquery or cfselect or...
    2. cfstoredproc: PL/SQL: Statement ignored
      Hoping someone can tell me what I'm doing wrong. I'm getting the error: ORA-06550: line 1, column 13: PLS-00306: wrong number or types of...
    3. Help with cfstoredproc
      OK I have huge problem with my cfstored proc I have stored procedure which retrieve lost password when you provide email. Stored procedure is...
    4. cfquery vs cfstoredproc
      Is there a difference in speed between using cfquery to call a stored procedure (MSSQL 2k) and using cfstoredproc? I understand the data integrity...
    5. cfstoredproc
      Any chance you're interested in emailing with me about CF coding related to a Informix db back-end? Please email me off-list at...
  3. #2

    Default Re: cfquery vs cfstoredproc

    My question was more along these lines: let's say I have a stored procedure
    called usp_updateMyTable. I can call that in one of two ways: <cfquery ...>
    call usp_updateMyTable ('option1', 'option2') </cfquery> or <cfstoredproc
    procedure='usp_updateMyTable' ...> <cfprocparam value='option1'
    dbVarName='row1' cfsqltype='cf_sql_varchar' null='no' /> <cfprocparam
    value='option2' dbVarName='row2' cfsqltype='cf_sql_varchar' null='no' />
    </cfstoredproc> If you make an error in the cfstoredproc and look at the error
    information, you'll see that it's actually internally creating a call
    statement. I've always thought that cfstoredproc would be faster than cfquery
    in this sort of case (when you're calling a stored procedure), but after
    looking at the error logs, I can't see any reason why it would be faster. In
    fact, it theoretically could be slower, as it has to translate it into a 'call
    statement' first. I've also never noticed an ad hoc cfquery select statement
    to be slower than its stored procedure counterpart, but I suppose I could do
    some more benchmarking on that one. - Andrew.

    anclarke 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