# Questions about cache and reflection

**URL:** https://community.dremio.com/t/questions-about-cache-and-reflection/7438
**Category:** Uncategorized
**Created:** [May 10, 2021, 10:56am UTC](https://community.dremio.com/t/questions-about-cache-and-reflection/7438 "2021-05-10T10:56:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![indigoblue8848](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@indigoblue8848](https://community.dremio.com/u/indigoblue8848)
#### Post date: [May 10, 2021, 10:56am UTC](https://community.dremio.com/t/questions-about-cache-and-reflection/7438/1 "2021-05-10T10:56:16Z")

</div>

i have two cases for performance test and don’t understand completely in dremio cluster.

1. run query to datasource(s3) without reflection  
i created tables to use and didn’t set reflection to prevent it from caching. query was executed twice and appeared different performance between executions

initial trial took 61s  
second trial took 18s

what i expected was data is not cached because i didn’t set reflection but it seems data was cached and like accelerated by that even though job execution page in job history didn’t show accelerated icon( firing rocket).

my question is, what makes the second execution faster? does it use local cache at second trial if there’s no update at the datasource?

1. run query with reflection  
turning on reflection fetched data from datasource to local storage. i used row reflection. and i ran the same query and performance seemed similar to previous execution’s second trial(18s).

my question is what is difference between second execution without reflection and execution with reflection?

it would be really helpful to me to understand how dremio works.

thanks!

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [May 11, 2021, 7:07am UTC](https://community.dremio.com/t/questions-about-cache-and-reflection/7438/2 "2021-05-11T07:07:08Z")

</div>

@indigoblue8848 There are 4 in total

- Unaccelerated query without C3
- Unaccelerated query with C3
- Accelerated query without C3
- Accelerated query with C3

Kindly send me the profiles of the different runs and I can explain what happened

---

<div class="post-metadata">

### Author: ![indigoblue8848](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@indigoblue8848](https://community.dremio.com/u/indigoblue8848)
#### Post date: [May 12, 2021, 1:48am UTC](https://community.dremio.com/t/questions-about-cache-and-reflection/7438/3 "2021-05-12T01:48:00Z")

</div>

Ok i’ll share my profiles with you

---

<div class="post-metadata">

### Author: ![indigoblue8848](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@indigoblue8848](https://community.dremio.com/u/indigoblue8848)
#### Post date: [May 13, 2021, 7:41am UTC](https://community.dremio.com/t/questions-about-cache-and-reflection/7438/4 "2021-05-13T07:41:09Z")

</div>

@balaji.ramaswamy hello, i’ve done replicating all the cases you’ve noted.

thanks for your help.

- Unaccelerated query without C3  
[initial\_execution\_without\_relfection.zip](https://community.dremio.com/uploads/short-url/7CkeIUnVUnX2yyF0IFWRvLS6oIx.zip) (3.4 MB)

- Unaccelerated query with C3  
[second\_execution\_without\_reflection.zip](https://community.dremio.com/uploads/short-url/yBHQt19TtUo2dpn4QTR9qiPmeos.zip) (3.3 MB)

- Accelerated query without C3  
[reflection\_without\_c3.zip](https://community.dremio.com/uploads/short-url/9QqujS6LOQMN9oNLvamRtgYNTci.zip) (2.1 MB)

- Accelerated query with C3  
[reflection\_with\_c3.zip](https://community.dremio.com/uploads/short-url/aZ6pALnTo8qKfqNUPRsyrmCBYvl.zip) (2.1 MB)
