Return-Path: Delivered-To: apmail-hive-user-archive@www.apache.org Received: (qmail 84711 invoked from network); 20 Jan 2011 07:23:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jan 2011 07:23:33 -0000 Received: (qmail 52116 invoked by uid 500); 20 Jan 2011 07:23:32 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 51798 invoked by uid 500); 20 Jan 2011 07:23:30 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 51786 invoked by uid 99); 20 Jan 2011 07:23:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 07:23:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of new2hive@gmail.com designates 209.85.210.48 as permitted sender) Received: from [209.85.210.48] (HELO mail-pz0-f48.google.com) (209.85.210.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 07:23:23 +0000 Received: by pzk28 with SMTP id 28so58741pzk.35 for ; Wed, 19 Jan 2011 23:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=OGdMT2Ev4g9IoEsfSbL73tXdnhWXTENKg05dJuIVa1s=; b=T4PlaCaJ2M+VDRPJFV27jf7WaytbS4cmNBFeYL4pzRTt7tYWn45qyaa3yobYRg98Lx mgLlXiaAcG9aI0QXdQEeHSNkBBnKOHs1uq4gfu7yYBw0bnpmMaD2lS1i/sGdS2uhP364 MKQQt73ndTcEvrquCC5OUMQGzpYIlpxOfwhZY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=iI341USIOV3HvVlDaKgseICMrtUCNb485YcROnbKHeBto9q2Wtd2ceonmiN48ybbJI +5vqJOF43KWuz5eB67HOpAnsvMpKG5uEUAQIZd/BQKfgSijP/TvoVa6OdyFvaJ02kx17 WQypZvy75q2ltp/LpYa9ij/JvvIDmqDjzgr3c= MIME-Version: 1.0 Received: by 10.142.178.16 with SMTP id a16mr1766869wff.259.1295508181645; Wed, 19 Jan 2011 23:23:01 -0800 (PST) Received: by 10.142.238.5 with HTTP; Wed, 19 Jan 2011 23:23:01 -0800 (PST) In-Reply-To: References: Date: Thu, 20 Jan 2011 12:53:01 +0530 Message-ID: Subject: Re: Mapjoin Usage Question From: hadoop n00b To: user@hive.apache.org Content-Type: multipart/alternative; boundary=000e0cd2dea0f87d28049a420068 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2dea0f87d28049a420068 Content-Type: text/plain; charset=ISO-8859-1 Thanks Leo, Does the smaller table go into the mapjoin hint? Actually, when I ran a test query with the bigger table in the hint, it performed better. On Thu, Jan 20, 2011 at 12:40 PM, Leo Alekseyev wrote: > You can only specify one table, and make sure to include its name, > i.e. /*+ mapjoin(t2)*/. For more info see > http://wiki.apache.org/hadoop/Hive/JoinOptimization and > http://www.slideshare.net/aiolos127/join-optimization-in-hive. > > Also, you are using a relatively old version of Hive, but I'll let > more experienced people on this list decide whether that's a problem > :) > > On Thu, Jan 20, 2011 at 2:00 AM, hadoop n00b wrote: > > Hi, > > > > How do I use the mapjoin hint in a query. > > > > Say, I have two tables t1 and t2 where t2 is the smaller table. Do I > specify > > t2 in the mapjoin hint? > > > > select /*+ mapjoin(b)*/ * from t1 join t2 b on (a.id = b.id) > > > > If I am joining two smaller tables, can I specify two clauses in the > > mapjoin? /*+mapjoin(b,c)*/? > > > > I am unable to find much documentation on this. I am using CDH2 with Hive > > 0.4.1 > > > > Thanks! > --000e0cd2dea0f87d28049a420068 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Leo,
=A0
Does the smaller table go into the mapjoin hint? Actually, when I ran = a test query with the bigger table in the hint, it performed better.
On Thu, Jan 20, 2011 at 12:40 PM, Leo Alekseyev = <dnquark@gmail.co= m> wrote:
You can only specify one table, = and make sure to include its name,
i.e. /*+ mapjoin(t2)*/. =A0 For more = info see
http://wiki.apache.org/hadoop/Hive/JoinOptimization and
http://www.slideshare.net/aiolos127/join-optimization-in-hive.

Also, you are using a relatively old version of Hive, but I'll let<= br>more experienced people on this list decide whether that's a problem=
:)

On Thu, Jan 20, 2011 at 2:00 AM, hadoop n00b <
new2hive@gmail.com> wrote:
>= Hi,
>
> How do I use the mapjoin hint in a query.
>
> Say, I have two tables t1 and t2 where t2 is the smaller table. Do I s= pecify
> t2 in the mapjoin hint?
>
> select /*+ mapjoin(b= )*/ * from t1 join t2 b on (a.id= =3D b.id)
>
> If I am joining two smaller tables, can I specify two clauses = in the
> mapjoin? /*+mapjoin(b,c)*/?
>
> I am unable to f= ind much documentation on this. I am using CDH2 with Hive
> 0.4.1
>
> Thanks!

--000e0cd2dea0f87d28049a420068--