Re: Query Optimization

2017-08-23 Thread Divya Gehlot
.@mapr.com kfara > >> a...@mapr.com>> wrote: > >> > >> Please share your SQL query and the query plan. > >> > >> To get the query plan, execute EXPLAIN PLAN FOR ; > >> > >> > >> Thanks, > >> > >> Khurra

Re: Query Optimization

2017-08-21 Thread Padma Penumarthy
XPLAIN PLAN FOR ; >> >> >> Thanks, >> >> Khurram >> >> >> From: Divya Gehlot <divya.htco...@gmail.com<mailto:divya.htco...@gmail.com >>>> >> Sent: Friday, August 18, 2017 7:15:18 AM &g

Re: Query Optimization

2017-08-20 Thread Divya Gehlot
e: > > Please share your SQL query and the query plan. > > To get the query plan, execute EXPLAIN PLAN FOR ; > > > Thanks, > > Khurram > > > From: Divya Gehlot <divya.htco...@gmail.com<mailto:divya.htco...@gmail.com > >

Re: Query Optimization

2017-08-17 Thread rahul challapalli
..@gmail.com > >> > Sent: Friday, August 18, 2017 7:15:18 AM > To: user@drill.apache.org<mailto:user@drill.apache.org> > Subject: Re: Query Optimization > > Hi , > Yes its the same query its just the ran the metadata refresh command . > My understanding is metada

Re: Query Optimization

2017-08-17 Thread Padma Penumarthy
Sent: Friday, August 18, 2017 7:15:18 AM To: user@drill.apache.org<mailto:user@drill.apache.org> Subject: Re: Query Optimization Hi , Yes its the same query its just the ran the metadata refresh command . My understanding is metadata refresh command saves reading the metadata. How about colum

Re: Query Optimization

2017-08-17 Thread Khurram Faraaz
Please share your SQL query and the query plan. To get the query plan, execute EXPLAIN PLAN FOR ; Thanks, Khurram From: Divya Gehlot <divya.htco...@gmail.com> Sent: Friday, August 18, 2017 7:15:18 AM To: user@drill.apache.org Subject: Re: Query Optimi

Re: Query Optimization

2017-08-17 Thread Divya Gehlot
Hi , Yes its the same query its just the ran the metadata refresh command . My understanding is metadata refresh command saves reading the metadata. How about column values ... Why is it reading all the files after metedata refresh ? Partition helps to retrieve data faster . Like in hive how it

Re: Query Optimization

2017-08-17 Thread Padma Penumarthy
It might read all those files if some new data gets added after running refresh metadata cache. If everything is same before and after metadata refresh i.e. no new data added and query is exactly the same, then it should not do that. Also, check if you can partition in a way that will not

Re: Query Optimization

2017-08-16 Thread Divya Gehlot
Hi, Another observation is My query had where conditions based on the partition values Total number of parquet files in directory - 102290 > Before Metadata refresh - Its reading only 4 files > After metadata refresh - its reading 102290 files This is how the refresh metadata works I mean it

Re: Query Optimization

2017-08-16 Thread Divya Gehlot
Hi, Another observation is My query had where conditions based on the partition values Before Metadata refresh - Its reading only 4 files After metadata refresh - its reading 102290 files Thanks, Divya On 17 August 2017 at 13:03, Padma Penumarthy wrote: > Does your query

Re: Query Optimization

2017-08-16 Thread Padma Penumarthy
Does your query have partition filter ? Execution time is increased most likely because partition pruning is not happening. Did you get a chance to look at the logs ? That might give some clues. Thanks, Padma > On Aug 16, 2017, at 9:32 PM, Divya Gehlot wrote: > >

Re: Query Optimization

2017-08-16 Thread Divya Gehlot
Hi, Even I am surprised . I am running Drill version 1.10 on MapR enterprise version. *Query *- Selecting all the columns on partitioned parquet table I observed few things from Query statistics : Value Before Refresh Metadata After Refresh Metadata Fragments 1 13 DURATION 01 min 0.233

Re: Query Optimization

2017-08-16 Thread Padma Penumarthy
Refresh table metadata should help reduce query planning time. It is odd that it went up after you did refresh table metadata. Did you check the logs to see what is happening ? You might have to turn on some debugs if needed. BTW, what version of Drill are you running ? Thanks, Padma > On Aug