QUERY BY FORMULAs for high-speed joins: Remedial help?

Joshua Fletcher (5/17/14 2:09AM)
David Adams (5/17/14 10:02AM)
Keisuke Miyako (5/17/14 1:00PM)
David Adams (5/18/14 7:34AM)


Joshua Fletcher (5/17/14 2:09 AM)

We spent a good deal of 2007/2008 harping on this. ?Aside from the
fact that it's buried in the ginormous v11 upgrade manuals :) there
was content in the Road Show, Pre-Class, Summit sessions, and assets
added to KB. Note that the JOIN behavior is disabled by default in
converted apps:

http://kb.4d.com/assetid=75045

Maybe also of interest just for completeness:

http://kb.4d.com/assetid=75165
http://kb.4d.com/assetid=75164

Kind regards,

Josh

--
Josh Fletcher
Technical Account Manager
4D, Inc

color><param>00000,0000,DDEE/param>
/color>

-----Original Message-----
color><param>00000,0000,DDEE/param>IIn the past,
QUERY BY FORMULA was a mark of Supreme Moral Failure so I've only ever
rarely used it...I can't even remember the last time. It sounds like a
command I should check out closely now.
/color>

David Adams (5/17/14 10:02 AM)

<CAPXPcQu3P1BtMAPHrjDVT_BTE+Ud2uAZ0gZVb-DWdybJ+2ZSiw@...

I've been following the "Creating Relations: Structure Editor vs SQL
Code
(ADD CONSTRAINT) Found Major Difference" thread with interest. In the
past,
QUERY BY FORMULA was a mark of Supreme Moral Failure so I've only ever
rarely used it...I can't even remember the last time. It sounds like a
command I should check out closely now.

As far as working as an alternative to a free-join style selection, how
would that work? I had a quick look at the docs and don't quite see it.

Imagine I've got

[Student]ID
?=A0[Test_Score]Student_ID

I'd normally do something like find a group of students and load their
test
scores:

Selection_Join(->[Student]ID;->[Test_Score]Student_ID)

...or find a selection of test scores (say, "great than 3.2") and load
up
the related students:

Selection_Join(--> [Test_Score]Student_ID ;>[Student]ID)

All I've got are matching ID values - no relation lines required. Can
someone offer a remedial example of how to do the same with QUERY BY
FORMULA.

For the record, I do _tons_ of joins in the way I've listed above. The
older I get, the better normalized my structures. As a consequence, I
have
to join across multiple tables routinely. I've got nice, neat routines
to
handle all of this so, depending on the syntax, it might not be at all
hard
for me to move to QUERY BY FORMULA.

Thanks for any help!

Keisuke Miyako (5/17/14 1:00 PM)

QUERY BY ARRAY has room for optimisation in that the evaluation of
array
elements require it to run in the cooperative thread; it means multiple
processes running simultaneous QBAs will run on the same CPU core.

In terms of sending the array as chunk,
I think that kind of optimisation has been present for some time.

The interesting comparison would be against QUERY BY SQL using the &igrave;IN&icirc;

statement.

On 2014/05/17 16:33, "David Adams" <dpadams@... wrote:

color><param>00000,0000,DDEE/param>IIf the command isn't
server-optimized, it wouldn't be hard to wrap it
up...if it makes enough difference in the field.
/color>

David Adams (5/18/14 7:34 AM)

<CAPXPcQtPCmLfqTTxH-9dzXM0zk_Pz0gKniP25CFHHzwVUp5unQ@...

On Saturday, May 17, 2014, Keisuke Miyako <Keisuke.Miyako@...
wrote:

color><param>00000,0000,DDEE/param>
The interesting comparison would be against QUERY BY SQL using the "IN"
statement.

/color>
That makes sense. In fact, I typically use sub queries in 4D instead of
JOIN as the JOIN syntax seems a bit brittle. My Q with A results are so
fast I can't do meaningful tests on this data set.

Reply to this message

Summary created 5/17/14 at 9:44PM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com