· Aug 23, 2020

2 Query - 1 Query Plan

I try to compare classic JOIN against implicit JOIN.

It is a simple case. But I am surprised.

The class:
Class Sample.Person1 Extends (%Persistent, %Populate)
{  Property Name As %String;
Property Home As Sample.Address;
Property AR As array Of Sample.Address; }

Query #1 - classic:
select name,home_state,a.* from sample.person1 p
join sample.person1_AR a on p.Id=a.person1
and home_state=AR_state

Query #2 - implicit
select person1->name,person1->home_state,*
from sample.person1_AR where person1->home_state=AR_state

for both I have the same query plan:

It is a simple query on  2 or 1 simple  tables.  Both have when executed 410 Global-Ref.
Can this be correct ?

Discussion (2)1
Log in or sign up to continue