> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of jjuser ud2
> Sent: Monday, September 25, 2006 2:01 PM
> To: [email protected]
> Subject: Re: [U2][UD] UniQuery SELECT WITH Limits
> 
> VERY helpful, thank you! :)  Now how about those limits...
> 

As a general rule it's almost always more efficient to break up a large
select into multiple smaller selects rather than attempting to specify
all of the selection criteria at once.  Your number of selection
criteria is much longer than anything I've ever had to deal with, but I
think you might find this to be true in your case as well.  I'd try
using a program to loop through 251 individual selects, merging the
saved list into the prior list each time.  You could put the "WITH"
values into their own saved list for easy maintenance later.  I'm
thinking of something like:

EXECUTE 'SELECT WITH.LIST', SELECT > LIST1
LOOP
  READNEXT WITH.ITEM FROM LIST1 ELSE
    ****
    EXIT
    ****
  END
  LIST2 = ''; LIST3 = ''
  EXECUTE 'DELETE.LIST TEMPLIST1'
  EXECUTE 'SELECT SOMEFILE WITH SOMEATTR "':WITH.ITEM:'"', SELECT >
LIST2
  EXECUTE 'SAVE.LIST TEMPLIST1', SELECT < LIST2
  EXECUTE 'MERGE.LIST TEMPLIST1 UNION TEMPLIST2 TO PERMLIST'
  EXECUTE 'GET.LIST PERMLIST', SELECT > LIST3
  EXECUTE 'SAVE.LIST TEMPLIST2', SELECT < LIST3
REPEAT
EXECUTE 'DELETE.LIST TEMPLIST2'

A little convoluted, but I think it's probably faster than any other
way.

-John
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to