CHOOSE and SELECT in QTP
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Thu, 25 Jan 2001 10:12:54 -0500
I know almost nothing about OpenVMS (the last Digital box I worked with was
a pdp11 :-) and you say nothing about the file type you are using --
indexed, database, whatever.
But as a general rule I have always considered that a keyed read (i.e.
CHOOSE) which will return more than about 10 or 15 percent of the records
will be slower than a serial read (i.e. ACCESS) coupled with a selection
filter (i.e. SELECT). This appears to be true regardless of language or tool
but seems particularly true of PowerHouse. I think you have just
demonstrated the truth in this theory.
I'll decline further speculation and let a Compaq expert provide a more
technical explanation.
Regards,
JWP
> -----Original Message-----
> From: Bourchi, H. [SMTP:bourchih@unive.nl]
> Sent: Thursday, January 25, 2001 9:02 AM
> To: 'powerh-l@sphere.swau.edu'
> Subject: CHOOSE and SELECT in QTP
>
> Goodday everyone,
>
> I am working for an insurence company, which has several sort of products
> (services).
> At this moment, possible products are "A############", "C############",
> "L############" and "O############", but in future could, new sort of
> products be added.
> By a QTP program, user has to be able to do some processing on alle of
> possible products.
> He has to be able to choose, witch sort of products are subject of
> processing. Possible choices has to be:
> 1- "A############" products
> 2- rest of the products.
>
> My first solution was:
>
> 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
>
> Regards,
> Hamid Bourchi
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.