hive> Create External Table Emp(
> id INT,
> name STRING,
> Salary INT)
> PARTITIONED BY (Country STRING, State STRING)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY ‘\t’
> LOCATION ‘/user/data/’;
Now load the data which is partition specific. For example,
hive> LOAD DATA LOCAL INPATH ‘---‘
> OVERWRITE INTO TABLE Emp
> PARTITION (Country=’US’ , State=’NJ’);
Now try running queries like
hive> Select Count(*), MAX(Salary) FROM Emp Where Country='US' And
State='NJ';
This will optimize your query performance.
On Fri, May 30, 2014 at 6:32 PM, <[email protected]> wrote:
> Can you please give a specific example or blog to refer to. I did not
> understand
>
>
>
> *From:* Ashish Garg [mailto:[email protected]]
> *Sent:* Friday, May 30, 2014 3:31 PM
> *To:* [email protected]
> *Subject:* Re: Need urgent help on hive query performance
>
>
>
> try partitioning the table and run the queries which are partition
> specific. Hope this helps.
>
> Thanks and Regards,
>
> Ashish Garg.
>
>
>
> On Fri, May 30, 2014 at 6:05 PM, <[email protected]> wrote:
>
> Hi,
>
>
>
> Does anybody help urgently on optimizing hive query performance? I am
> looking more Hadoop tuning point of view. Currently, small amount of table
> takes much time to query?
>
>
>
> We are running EMR cluster with 1 MASTER node, 2 Core Nodes and Task
> Nodes.
>
>
>
> Quick help is much appreciated.
>
>
>
> Thanks,
>
> Shouvanik
>
>
> ------------------------------
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise confidential information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the e-mail by you is prohibited. Where allowed
> by local law, electronic communications with Accenture and its affiliates,
> including e-mail and instant messaging (including content), may be scanned
> by our systems for the purposes of information security and assessment of
> internal compliance with Accenture policy.
>
> ______________________________________________________________________________________
>
> www.accenture.com
>
>
>