Indexed or Seq?

Deskin, Bob Bob.Deskin at Cognos.COM
Thu Aug 11 21:04:00 CDT 2005


Thanks Darren. Fernando, this is what I was thinking of. I think we'd all be interested in a performance comparison between the old and the cursor, if you decide to try it.

Bob

-----Original Message-----
From: powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com
[mailto:powerh-l-bounces+bob.deskin=cognos.com at lists.sowder.com]On
Behalf Of Darren Reely
Sent: August 11, 2005 9:39 PM
To: powerh-l at lists.sowder.com
Cc: fernando.olmos at hpa.com.au
Subject: Re: Indexed or Seq?


Fernando,

I have used all three methods Conrad mentioned. Stored procedures for 
passing and returning variables, but not row sets. Views look just like 
any table. I use cursors in special one-shot items or in one case where 
a problem (dynamically floating user preferred data to top of a cluster) 
couldn't be solved any other way in Powerhouse.

You need to be aware that Powerhouse will not let you use Oracle 
specific functions such as DECODE(), TO_CHAR(), etc, in cursors . Even 
with this BIG annoyance, cursors can still give you advantages.


Here is your ACCESS statement converted to use a cursor. If I wrote it 
properly, you should be able to paste it into a Quiz session.

sql in hisdb  &
declare my_invoices  &
cursor for  &
;; NOTE: Selecting ALL (*) may impact performance.
select im.* ,id.*  &
from invoice_master im  &
	,invoice_detail id  &
where im.order_no = id.order_no

access my_invoices
choose order_no parm prompt "enter order number: "
report  order_no of my_invoices  product_code of my_invoices


Good luck with your optimizations.

Darren


Whittall, Conrad wrote:
> Fernando,
>  
> I believe the answer to your questions is Yes and Yes...with PowerHouse 
> 8 you can do either -- embed a declared cursor in your PH code, or 
> create a view or stored procedure in the database and have PH access 
> that. You can find all the details in the PowerHouse Series 8 Books, 
> available online from the PowerHouse site...
>  
>     -----Original Message-----
>     *From:* Fernando Olmos
>     *Sent:* Friday, August 12, 2005 8:24 AM
>     *To:* powerh-l at lists.sowder.com
>     *Subject:* RE: Indexed or Seq?
> 
>     Bob and Joe,
>      
>     Thank you both for the input. I fully understand what's going on.
>     Just one more question... Bob, are you saying to declare the cursor
>     using SQL or is there a way to do this in QUIZ and have it embedded
>     into the BUILD of the QUIZ program? OR can the cursor be declared at
>     the database level and accessed via QUIZ? A view? Sorry, but I am
>     not that familiar with Oracle. I know in Oracle RDB, from the VAX,
>     we were able to "stream-line" queries with cursors, but only using
>     embedded SQL within COBOL. I have never seen cursors been used from
>     within Powerhouse.
>      
>     Cheers
-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber. 
  
       This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you. 
        
 



More information about the powerh-l mailing list