Re: v12 - Which is faster?

2016-09-21 Thread Chuck Miller
Why would you want to load record across network

Let’s say I have array with 100 elements.

I query with array get 100 record

do a distinct values get 100 elements voila you are done

do a distinct value and get 99 records OH OH you have as problem

you might also query index not sure of command.

With this few records, to probably doesn’t make any difference time wise but 
with larger selections (in  tens of thousands I bet it would)

Regards

Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  



> On Sep 21, 2016, at 4:56 PM, Peter Bozek  wrote:
> 
> Not sure I understand problem, but why you want to use query at all? You
> can sort selection, step through records and check if any two items are
> same?

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v12 - Which is faster?

2016-09-21 Thread Peter Bozek
On Wed, Sep 21, 2016 at 10:44 PM, Chip Scheide <4d_o...@pghrepository.org>
wrote:

> Table has about 150k records
> query with array is performed on table
> a number of records are in selection, but always <100.
> record data is in cache.
> Client/Server
>
> It is necessary to step through the selection to insure that only one
> record exists
> for each array element in the query with array, and if true, do some
> processing.
>
> Which is faster/better?
> is there a difference?
>
>
> Query([table][table]index_Field=value)
> or
> use set
> Query selection([table];[table]Indexed_field=value)
>

Not sure I understand problem, but why you want to use query at all? You
can sort selection, step through records and check if any two items are
same?

-- 

Peter Bozek
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v12 - Which is faster?

2016-09-21 Thread Chuck Miller
I would modify as follows
set query destination into a variable 
query table
check variable

You might also query with array

distinct values. If records in selection count = query with array count and 
distinct values count also equals, you have only one record each



Regards
Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  



> On Sep 21, 2016, at 4:44 PM, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> 
> Query([table][table]index_Field=value)
> or
> use set
> Query selection([table];[table]Indexed_field=value)

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: v12 - Which is faster?

2016-09-21 Thread Dennis, Neil
Try both ways with a timer... but my money is on Query table without the use 
set.

Let us know.

Neil





--

Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**