Do you get records from this query?
select
*
from
`mongo.grounds`.`Elements` element
where element.PlanId = '1623263140';
Incidentally, for the full query including the WHERE clause, the form
below is probably going to be a good deal faster than the ones we've
written so far. I reintroduced some backticks, just in case that was
causing any trouble.
with element as (
select
`_id`,
ElementTypeName,
ElementSubTypeName,
PlanId
FROM
`mongo.grounds`.`Elements`
where PlanId = '1623263140'
), element_effort as (
select
`_id`,
EffortTypeName
FROM
`mongo.grounds`.`Elements_Efforts`
)
select
*
from
element
join
element_effort on element.`_id` = element_effort.`_id`
On 2022/02/03 17:05, Daniel Clark wrote:
I tried again with this query:
with element as (
select
_id,
ElementTypeName,
ElementSubTypeName,
PlanId
FROM
`mongo.grounds`.`Elements`
), element_effort as (
select
_id,
EffortTypeName
FROM
`mongo.grounds`.`Elements_Efforts`
)
select
*
from
element
join
element_effort on element._id = element_effort._id
where element.PlanId = '1623263140'
The query completed successfully, but it did not return any rows. I've
attached the log and the profile.