>>> Hi
>>> >>>>
>>> >>>> I would actually do it like this…so that the set on the left of JOIN
>>> >>>> becomes smaller
>>> >>>>
>>> >>>> SELECT a.item_id, a.create_dt
>>&
; >>>> I would actually do it like this…so that the set on the left of JOIN
>> >>>> becomes smaller
>> >>>>
>> >>>> SELECT a.item_id, a.create_dt
>> >>>> FROM
>> >>>> ( SELECT
>> >>&
t;>>
> >>>> SELECT a.item_id, a.create_dt
> >>>> FROM
> >>>> ( SELECT
> >>>> item_id, create_dt
> >>>> FROM
> >>>> A
> >>>> WHERE
>
A
>>>> WHERE
>>>>item_id = 'I001'
>>>> AND
>>>> category_name = 'C001'
>>>> ) a
>>>> JOIN
>>>> b
>>>>
reate_dt
>>> FROM
>>> A
>>> WHERE
>>>item_id = 'I001'
>>>AND
>>> category_name = 'C001'
>>> ) a
>>> JOIN
>>&g
) a
>> JOIN
>> b
>> ON
>> a.item_id = b.item_id
>> ;
>>
>>
>> From: Naga Vijay
>> Reply-To: "user@hive.apache.org"
>> Date: Wednesday, June 12, 2013 9:17 PM
>> To: "user@hive.apache.org"
&
item_id = 'I001'
>AND
> category_name = 'C001'
> ) a
> JOIN
> b
> ON
> a.item_id = b.item_id
> ;
>
>
> From: Naga Vijay
> Reply-To: "user@hive.apache.org"
> Date
13 9:17 PM
To: "user@hive.apache.org<mailto:user@hive.apache.org>"
mailto:user@hive.apache.org>>
Subject: Enhancing Query Join to speed up Query
Hi,
Which of the two query options is better?
SELECT a.item_id, a.create_dt
FROM a JOIN b
ON (a.item_id = b.item_id)
WHERE a.item_
Hi,
Which of the two query options is better?
SELECT a.item_id, a.create_dt
FROM a JOIN b
ON (a.item_id = b.item_id)
WHERE a.item_id = 'I001'
ANDa.category_name = 'C001';
- or -
SELECT a.item_id, a.create_dt
FROM a JOIN b
ON (a.item_id = b.item_id AND a.item_id = 'I001')
WHERE