gerry-u2ug wrote:

is this true ?  I have never experienced the slowdown of the initial 
"traversal" and can't see the need for it - this statement just uses a 
different select list other than zero.  now if the question had been regarding SELECTV 
rather than SELECT, then I would agree.

Gerry


Mea culpa!

As there's no way you can assign the resulting select list to a variable without first 'traverse' the file - that is without at least read the list of record-id in each page ( or hash point ) I jumped to the conclusion that there would be..

But evidently the implementation is such as the variable is not assigned to/with/as
the full list before the program continues with the loop.

That also explains why you can't do much else than readnext with
a list variable -  dcount it for example.


Took a large file  used both methods and printed the first
readnext'ed id   and timed it for proof - both ways printed
emediately.

(But I had to SELECTV  for the list variable case )

-- mats

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mats Carlid
Sent: Thursday, July 14, 2005 06:22 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] [UV] Select Question


I'm aware of two differences that may be of importance

- if we're speaking uv -

The LIST alternative is immune to a secondary select
inside the loop  -  possibly well hidden in an itype in
a subroutine of an subr....


The bare select lets the readnext loop start emediately
and saves (probably) one traversal of the file.


So yes You'd save overhead - lot's of wall clock time
and io but probably not that much cpu.

hth
-- mats


[EMAIL PROTECTED] wrote:

Hi all,

Can someone tell me the diference between the following two examples of 
executing an external select?

SELECT FILE TO LIST
LOOP
  READNEXT ID FROM LIST ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

SELECT FILE
LOOP
  READNEXT ID ELSE ID = @AM
UNTIL ID = @AM DO
REPEAT

Someone pointed out to me that there is overhead in selecting to a list that I 
need not be exposing myself to.  Aren't they both kind of reading from a list 
somewhere anyways?

Thanks
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to