Skip to main content
Inspiring
April 20, 2009
Question

cfstoredproc performance?

  • April 20, 2009
  • 1 reply
  • 728 views

Hello,

In SQL2005, when i use<cfstoredproc></cfstoredproc>

from procedure..if i return result like this without using output parameter...Is there a performance problem?

create procedure tbl_a_list

as

@iD84_2_in as int;

select name, address, sal

from tbl_a

where id =  @iD84_2_in

OR

If i use out parameter for all varibles?..Performance increase with CF?.

create procedure tbl_a_list

as

@iD84_2_in as int;

@8967549 varchar(25) output,

@address varchar(25) output,

@Sal8524867 int output,

select @8967549=name, @address=address,@sal=sal

from tbl_a

where id =  @iD84_2_in

Please help me.

This topic has been closed for replies.

1 reply

April 21, 2009

Hi,

Your first stored procedure looks fine:

CREATE PROCEDURE tbl_a_list

     @id_in int

BEGIN

     SELECT T.name, T.address, T.sal

     FROM tbl_a T

     WHERE id = @id_in

END

Use this to call the procedure:

<cfstoredproc datasource="#SESSION.DSN#" procedure="tbl_a_list">
   <cfprocparam cfsqltype="cf_sql_integer" type="in" value="#id_in#">
   <cfprocresult name="getData">
  </cfstoredproc>

cfwild