Return-Path: Delivered-To: apmail-hive-user-archive@www.apache.org Received: (qmail 29424 invoked from network); 20 Jan 2011 14:24:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jan 2011 14:24:06 -0000 Received: (qmail 30235 invoked by uid 500); 20 Jan 2011 14:24:06 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 29973 invoked by uid 500); 20 Jan 2011 14:24:02 -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 29965 invoked by uid 99); 20 Jan 2011 14:24:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 14:24:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ajo.fod@gmail.com designates 74.125.82.176 as permitted sender) Received: from [74.125.82.176] (HELO mail-wy0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 14:23:56 +0000 Received: by wye20 with SMTP id 20so689590wye.35 for ; Thu, 20 Jan 2011 06:23:34 -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:content-transfer-encoding; bh=u1/zwo6jTRwF9z2CZ7MUWg3gPZJ8NdJFcA+uH9bcwHE=; b=UYZboaR0lR7KgnNfW3E0c9ySa8e1bUycwmTePjxn5gMwyexoZzfUXj6RKdp78+J9X4 Fi6SqFyzMXZYngLGVr+7MbuqRc8FJz2ViEYJ4+IFV5eNHT5NUZzxxr5ckoHhE0a/jyXT Rk4P1IpXfr8fpWbxSYBCeyesm+p5G1W0TphE8= 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:content-transfer-encoding; b=SSROpPbCN57niUQEWtOM5FBz1w2HBkNuXc1QSS+aOpsRDvzUBMKVkppenSSxpe0YKe obIyrf/jdEI47F3OedMQ9qPLhOcgSFk5SkMWWstOUFSsEpo9WuKznE1ppQt440SULWAy ZscujsxQK6885LdRoeCkdmkETsumXl6PGMNwQ= MIME-Version: 1.0 Received: by 10.227.132.83 with SMTP id a19mr2422829wbt.112.1295533414841; Thu, 20 Jan 2011 06:23:34 -0800 (PST) Received: by 10.227.29.201 with HTTP; Thu, 20 Jan 2011 06:23:34 -0800 (PST) In-Reply-To: References: Date: Thu, 20 Jan 2011 06:23:34 -0800 Message-ID: Subject: Re: Mapjoin Usage Question From: Ajo Fod To: user@hive.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It probably depends on how big the big table is ... I mean if it can be held in memory. -Ajo On Wed, Jan 19, 2011 at 11:23 PM, hadoop n00b wrote: > Thanks Leo, > > Does the smaller table go into the mapjoin hint? Actually, when I ran a t= est > 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)*/. =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 >> 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 =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 find much documentation on this. I am using CDH2 with >> > Hive >> > 0.4.1 >> > >> > Thanks! > >