Performance Questions and a little need for some education.-Output Phase reading

Dan Lambshead dlambshe at milk.org
Tue Aug 18 16:31:46 CDT 2009


Hi Ken,
 
  Another advantage of this "Output phase read trick" I could see is less
I/O - as in your example below it does the Products file read only at
ProductNumber after it has been sorted, as opposed to in the Access
statement it would do it for every record or at least whenever the
ProductNumber happens to change.
 
  It will be interesting to see how many others have seen this trick before
and what they think about it (already an email from David!). We used this
quite alot where I used to work before.
 
Dan

  _____  

From: powerh-l-bounces+dlambshe=milk.org at lists.sowder.com
[mailto:powerh-l-bounces+dlambshe=milk.org at lists.sowder.com] On Behalf Of
Dan Lambshead
Sent: Tuesday, August 18, 2009 4:36 PM
To: Ken at Langendock.com; powerh-l at lists.sowder.com
Subject: RE: Performance Questions and a little need for some
education.-Output Phase reading


Hi Ken,
 
  Yes, that is exactly what I've seen! I would say it makes the code more
readable, by simplifying the Access statement, and it also reduces the
record complex so could improve performance. Beyond that I am trying to
remember if there are any more advantages (perhaps for one, if you're
reaching the no of files limit, it doesn't count).
 
Dan

  _____  

From: powerh-l-bounces+dlambshe=milk.org at lists.sowder.com
[mailto:powerh-l-bounces+dlambshe=milk.org at lists.sowder.com] On Behalf Of
Ken Langendock
Sent: Tuesday, August 18, 2009 4:20 PM
To: powerh-l at lists.sowder.com
Subject: RE: Performance Questions and a little need for some education.
-Output Phase reading



Yep that is what I meant.

 

The advantages:

If you relate this to a QUICK screen; you have a Primary file and some
detail/secondary files and reference files.

 

In QTP the only thing you need to access (via the ACCESS statement are the
Primary and/or Secondary/detail files.

All other files can be read in the OUTPUT PHASE (obviously that rule is
subjective depending on the desired record complex).

 

For example:

In a screen you could have:

FILE Orders PRIMARY

FILE OrderDetails DETAIL

FILE Products REFERENCE

Show the order info, detail info and the product description.etc.

 

 

In QTP you can set the same thing up like this:

ACCESS Orders &

  LINK OrderNumber OF Orders &

    TO OrderNumber &

    IN OrderDetails

 

  SORT ON ProductNumber OF OrderDetails &

       ON DateLastOrder OF OrderDetails

 

OUTPUT Products &

       AT ProductNumber &

       ADD &

       UPDATE &

       NOITEMS &

       IF 1 EQ 2 &

       VIA   ProductNumber &

       USING ProductNumber OF OrderDetails

    

 

SUBFILE subfile1 &

        KEEP &

        AT ProductNumber &

        INCLUDE whatever

 

 

Ken

 

From: Dan Lambshead [mailto:dlambshe at milk.org] 
Sent: August 18, 2009 3:25 PM
To: Ken at Langendock.com; powerh-l at lists.sowder.com
Subject: [Bulk] RE: Performance Questions and a little need for some
education.

 

Hi Ken,

 

  Just wondering what you mean by "Output Phase Read". Is that when you do
an Output ... if 1 = 2 ... or something like that, so you are only doing a
read? I have seen that before, but now am trying to remember what the
advantages are (if that's what you're talking about).

 

Dan

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20090818/eb49c9a9/attachment.htm 


More information about the powerh-l mailing list