Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfstoredproc performance?

Explorer ,
Apr 20, 2009 Apr 20, 2009

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

@iD_in as int;

select name, address, sal

from tbl_a

where id =  @iD_in

OR

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

create procedure tbl_a_list

as

@iD_in as int;

@name varchar(25) output,

@address varchar(25) output,

@Sal int output,

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

from tbl_a

where id =  @iD_in

Please help me.

TOPICS
Database access
696
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 20, 2009 Apr 20, 2009
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources