[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: FW: SQR vs. C & Stored Proc performance
- Subject: Re: FW: SQR vs. C & Stored Proc performance
- From: Bob Shiflett <shifletb@WLRFOODS.COM>
- Date: Wed, 17 Jun 1998 13:19:38 -0400
simple example of how to call database functions & procedures (within a
package).
using sqr V3.0.12.1
hp-ux 9000
begin-report
do get_parameter
end-report
begin-procedure get_parameter
let $user_name = 'SHIFLETB'
begin-sql
begin
!these two call a packaged function
$system_date := test.get_system_date;;
$system_date_time := test.get_system_date_time;;
!these one calls a packaged procedure
test.get_gemms_parameters($user_name,$printer,$code,$name,$op_group);;
end;;
end-sql
show (1,1) clear-screen
show (1,1) $system_date
show (1,+1) $user_name
show (1,+1) $printer
show (1,+2) $code
show (1,+2) $name
show (1,+2) $system_date_time
end-procedure
e-mail shifletb@wlrfoods.com
-----Original Message-----
From: Simonian, Guy <SimonianG@AETNA.COM>
To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
Date: Wednesday, June 17, 1998 9:51 AM
Subject: FW: SQR vs. C & Stored Proc performance
>That's all true Juan. However my client is more interested in overall
>application performance than in ease of development.
>
>Using a low level language like C would allow the use of cursors and stored
>procedures that are saved right on the database.
>
>As far as I can tell, SQR "creates" temporary stored procedures as it runs.
>Consequently, you may be getting 10's or hundreds of these temporary stored
>procedures, where just 1 may suffice and be more efficient.
>
>I find the ease of development to be exceptionally good with SQR,
especially
>with the ability to put programming logic within the
>begin-select..end-select sequence.
>
>There seems to exist the capability of using SQR to run database resident
>stored procedures by calling those proc's inside a begin-sql...end-sql
>sequence, but then the programming becomes more difficult. Has anyone done
>this that can show us a simple example?
>
>
>> ----------
>> From: Juan Alvarado[SMTP:juan@GYSSA.COM.GT]
>> Sent: Monday, June 15, 1998 6:36 PM
>> To: Multiple recipients of list SQR-USERS
>> Subject: Re: SQR vs. C & Stored Proc performance
>>
>> I think that it's best to write the reports in SQR, because its very
>> dificulty to write this in C. And the languaje of SQR have all the
>> power of C with a very easy languaje.
>>
>>
>>
>> Juan Manuel Alvarado
>> CPS-DBA Sybase XI
>> Gerencia & Sistemas Guatemala
>> www.gyssa.com.gt
>>
>> > -----Original Message-----
>> > From: Simonian, Guy [SMTP:SimonianG@AETNA.COM]
>> > Sent: Wednesday, June 10, 1998 10:36 AM
>> > To: Multiple recipients of list SQR-USERS
>> > Subject: SQR vs. C & Stored Proc performance
>> >
>> > We are thinking of rewriting our payroll statements in C using stored
>> > procedures (Win NT against sybase 11) due to a perceived performance
>> > improvement. Will be producing 3000 15 page reports at a time, doing
>> > multiple table joins to show all the detail.
>> >
>> > Had some significant improvement a while back by using dynamic sql
>> > verses
>> > stored proc's (-xp) option for some of the queries.
>> >
>> > I've searched the users group archives but did not find much
>> > discussion on
>> > this topic.
>> >
>> > We've got about 5000 lines of SQR code developed. Many say it will
>> > take 2
>> > or 3 times longer to write in C or C++ if anyone wants to comment on
>> > that as
>> > well!
>> >
>> > Another alternative would be to invoke stored procs from SQR directly
>> > with
>> > begin-sql end-sql sections.
>>
>