Re: Stored Procedure use and Table reads
Posted in 1997
In article <01bc13ac$0c23b2a0$a10b0514@rram.den.csci.csc.com>, CSC CIS
<rramesh@csci.csc.com> writes
>Hi,
> I am new to stored procedures. My understanding is that stored
>procedures are suppose to to reduce the number of opens and the user cpu
>that it uses. But I executed the following stored procedure about 100000
No - the reduce the amount of communication between the front end
process i.e. .4ge or PC client.
>time in a loop expecting the number of reads to be low,
>
>create procedur "informix".testproc ()
>define a_var long;
>select a.b into a_var FROM a wHERe a.b = 1
>end procedure
>
>This procedure was executed through the following loop
>
>int i;
>for ( i=0;i<100000;i++)
> execute procedure testproc();>
>if I run this procedure as DBA the number of opens,bufreads and usercpu
>remains low. If I run as any body else with anyother kind of permission the
>number of opens,bufread,usercpu goes in way up. Though informix manual says
>that execute permission exist for public the informix Engine seems to be
>checking for the permission.
Each time yuo execute the procedure it has to check that the
permission still exists as you can revoke execute permission on the
procedure.
>
>
>My question is is there a way to get around this problem.
>
Yes do not execute the procedure so often!
>I have tried the following
> grant "PUBLIC" as informix for the stored procedure.
> grant resourse to PUBLIC
> grant EXECUTE to the Stored procedure.>
>Thanks
>
>Ramesh
--
David Williams