CHOOSE and SELECT in QTP

Chris Sharman Chris.Sharman@ccagroup.co.uk
Thu, 25 Jan 2001 14:58:41 +0000


Is this RMS ? If not (Rdb or whatever) I've no useful knowledge.
Assuming RMS, is product_item the primary key, or alternate ?
If it's an alternative RMS key (not key 0), then reading a large number of
record by it will be very inefficient in terms of disk access, since it will
potentially re-read a whole data bucket for each record, and that could
well account for the poor performance. Sequential access (identical to access
by primary key) would read each data bucket once, then process all the records
in it.
If it's the primary key, I have no explanation and would be interested to hear
one, presumably from Cognos: I don't believe there would be a VMS/RMS related
explanation for this behaviour.
I'm not sure whether the Powerhouse dictionary primary key is necessarily the
same key as the RMS primary key.
"$ analyse/rms/fdl <datafile>" will generate a .fdl file describing (text) the
datafile and its keys - Key 0 is the primary.

Chris

>access product_table
>define product_choice char*1 = parm
>choose product_item (case of product_choice 		&
>			when "A" : "A@"			&
>			when "L" :  "B@@")
>Do processing ...
>
>In case of A was QTP in 5 minutes finished and in case of L in 92 minutes!
>92 minutes processing time seemed a bit strange. So I tried to campare it
>with a SELECT statement construction:
>
>access product_table
>define product_choice char*1 = parm
>select if product_item[1:1] <> "A"
>
>Do processing ...
>
>I was surprised when I saw a SELECT statement construction is almost 5 times
>faster then a CHOOSE statement; Qtp was in 16 minutes finished. I am aware
>of difference between "B@@" and "<> "A"". But I don't believe this is the
>only reason for such a big processing time difference. Or I am doing
>something wrong and saying something stupid?
>
>We are running on PH 7.10.F2 and OpenVMS for ALPHA V7.1-1H1
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk		http://www.ccagroup.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.


-----------------------------------------------------------------------

Any views expressed in this message are those of the sender and not
necessarily those of CCA Group.  The unauthorized use, disclosure,
copying or alteration of this message is forbidden.  The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed.  Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.