First I would suggest to ignore the view and try out a query which has the
required filters as part of the subqueries on both sides of the union (for
both the database and partitioned parquet data). The plan for such a query
should have the answers to your question. If both the subqueries
independently prune out un-necessary data, using partitions or indexes, I
don't think adding a union between them would alter that behavior.

-Rahul

On Mon, Mar 19, 2018 at 1:44 PM, Ted Dunning <ted.dunn...@gmail.com> wrote:

> IF I create a view that is a union of partitioned parquet files and a
> database that has secondary indexes, will Drill be able to properly push
> down query limits into both parts of the union?
>
> In particular, if I have lots of archival data and parquet partitioned by
> time but my query only asks for recent data that is in the database, will
> the query avoid the parquet files entirely (as you would wish)?
>
> Conversely, if the data I am asking for is entirely in the archive, will
> the query make use of the partitioning on my parquet files correctly?
>

Reply via email to