# Raw reflection not used when applying a simple filter

**URL:** <https://community.dremio.com/t/raw-reflection-not-used-when-applying-a-simple-filter/911>\
**Category:** Uncategorized\
**Created:** [March 23, 2018, 2:14pm UTC](https://community.dremio.com/t/raw-reflection-not-used-when-applying-a-simple-filter/911 "2018-03-23T14:14:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfleckinger](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dfleckinger/32/370_2.png) [@dfleckinger](https://community.dremio.com/u/dfleckinger)\
**Post date:** [March 23, 2018, 2:14pm UTC](https://community.dremio.com/t/raw-reflection-not-used-when-applying-a-simple-filter/911/1 "2018-03-23T14:14:39Z")

</div>

I’m very confused on how Dremio decides to use reflection.

I have a VDS with a raw acceleration, called sandbox.test\_vds  
when I run a

> SELECT \*FROM sandbox.test\_vds

the acceleration is used :

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/3ce790e429c652ebdcf991b1562aa8b4fe936dd4.png)

However, when I filter it,  
reflection is not used

eg when running

> SELECT \*  
> FROM sandbox.test\_vds  
> where accountId=‘blablaba’  
> , the same reflection is not used, and finishes in error in planning phase

Any advise how i can ensure the query will use the reflection ?

[query\_with\_filter\_ec3851d2-5667-4d36-9230-9fd5755cc91b.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/fde637ed46e29c1c1bce851cf388574f6f3ae6cd.zip) (4.5 KB)  
[query\_no\_filter\_fe132f4d-2331-49a6-908c-1b2b250547f9.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/50923c4a4798365bcafcb62e61e1668508b58eb8.zip) (16.1 KB)

---

<div class="post-metadata">

**Author:** ![doron](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/doron/32/294_2.png) [@doron](https://community.dremio.com/u/doron)\
**Post date:** [March 24, 2018, 5:13am UTC](https://community.dremio.com/t/raw-reflection-not-used-when-applying-a-simple-filter/911/2 "2018-03-24T05:13:37Z")

</div>

Hi,

Dremio should most likely be using the reflection in that case, also concerning is that you are running into the 60 second planning error.

Could you provide some more information about the vds? What source(s) does it use, is it a join for example?

---

<div class="post-metadata">

**Author:** ![dfleckinger](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/dfleckinger/32/370_2.png) [@dfleckinger](https://community.dremio.com/u/dfleckinger)\
**Post date:** [March 25, 2018, 7:36pm UTC](https://community.dremio.com/t/raw-reflection-not-used-when-applying-a-simple-filter/911/3 "2018-03-25T19:36:37Z")

</div>

Hi @doron, the vds is based on multiple other vds, with multiple joins, and the sources are parquet datasets, Mysql tables, and MongoDB collection
