# Reflection refresh is not accelerated if it involves a JOIN

**URL:** <https://community.dremio.com/t/reflection-refresh-is-not-accelerated-if-it-involves-a-join/3322>\
**Category:** Uncategorized\
**Created:** [May 8, 2019, 10:40am UTC](https://community.dremio.com/t/reflection-refresh-is-not-accelerated-if-it-involves-a-join/3322 "2019-05-08T10:40:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joejk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/joejk/32/1446_2.png) [@joejk](https://community.dremio.com/u/joejk)\
**Post date:** [May 8, 2019, 10:40am UTC](https://community.dremio.com/t/reflection-refresh-is-not-accelerated-if-it-involves-a-join/3322/1 "2019-05-08T10:40:18Z")

</div>

For the below example query, UI (run) will be accelerated but reflection refresh will not be accelerated.  
Query profile for UI (run)  
[a833c381-532a-4013-9b7f-04de1eb12106.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/5/55739dc666faf6d089bfd22c9b9e4163a9b55715.zip) (38.2 KB)

Query profile for reflection refresh:  
[82f084d7-68f0-4873-873e-c50cc89533ae.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/1/1797f1e56cddbeafc739d0361a3ac31897a8ffe8.zip) (73.4 KB)

Example query:

```auto
with subscribers as (
    select user_profile_id
    from "core".subscriptions
)
select * 
from "core".signups
    inner join subscribers on subscribers.user_profile_id = signups.user_profile_id

```

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [May 10, 2019, 10:50pm UTC](https://community.dremio.com/t/reflection-refresh-is-not-accelerated-if-it-involves-a-join/3322/2 "2019-05-10T22:50:14Z")

</div>

Hi @joejk,

The reflection refresh does not look like it’s referring to the same VDS as your query (compare the Convert To Rel sections of the query plan and you’ll see they are different).

For the reflection job, can you try running a `SELECT * FROM my.vds` where `my.vds` is the VDS for which you’ve built the reflection?

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [May 11, 2019, 12:00am UTC](https://community.dremio.com/t/reflection-refresh-is-not-accelerated-if-it-involves-a-join/3322/3 "2019-05-11T00:00:32Z")

</div>

@joejk, I was mistaken; those Convert To Rel may be different depending on whether you are doing and aggregate reflection or a raw reflection. The information I requested would still be useful in diagnosing the issue.

---

<div class="post-metadata">

**Author:** ![joejk](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/joejk/32/1446_2.png) [@joejk](https://community.dremio.com/u/joejk)\
**Post date:** [May 15, 2019, 1:21pm UTC](https://community.dremio.com/t/reflection-refresh-is-not-accelerated-if-it-involves-a-join/3322/5 "2019-05-15T13:21:30Z")

</div>

@ben,  
I ran into this again with another query. Posting it hoping it is useful. Also, it would be useful if there is any documentation around what `Convert to Rel` is.

UI(Preview) was accelerated. Here is its profile  
[6ac0d31c-2468-47b5-89e2-32dda1a5fc04.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/1/17a8bf6cef8b376818a80cb1726d6ebd0b40c91c.zip) (52.4 KB)

Raw reflection was not accelerated. Here is the profile  
[67d6c83b-be5a-4d53-9e0c-36eaf8d2ef42.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/2X/7/758faf7fa08443eaa948ef2a1712a81803c74d86.zip) (65.7 KB)
