<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question BLOB with ORC in Hive in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/BLOB-with-ORC-in-Hive/m-p/176455#M67660</link>
    <description>&lt;P&gt;This is the access pattern:&lt;/P&gt;&lt;P&gt;Select datetime from tableName  where id
=?&lt;/P&gt;&lt;P&gt;Select content from tableName where id =? And datetime=?&lt;/P&gt;&lt;P&gt;One of the columns is a BLOB and the table is in ORC format. (The table needs to be transactional)&lt;/P&gt;&lt;P&gt;Because of the BLOB, the read times are high. &lt;/P&gt;&lt;P&gt;Any recommendations on optimization? This is on HDP 2.3.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2017 03:29:31 GMT</pubDate>
    <dc:creator>kerra</dc:creator>
    <dc:date>2017-09-06T03:29:31Z</dc:date>
    <item>
      <title>BLOB with ORC in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/BLOB-with-ORC-in-Hive/m-p/176455#M67660</link>
      <description>&lt;P&gt;This is the access pattern:&lt;/P&gt;&lt;P&gt;Select datetime from tableName  where id
=?&lt;/P&gt;&lt;P&gt;Select content from tableName where id =? And datetime=?&lt;/P&gt;&lt;P&gt;One of the columns is a BLOB and the table is in ORC format. (The table needs to be transactional)&lt;/P&gt;&lt;P&gt;Because of the BLOB, the read times are high. &lt;/P&gt;&lt;P&gt;Any recommendations on optimization? This is on HDP 2.3.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 03:29:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/BLOB-with-ORC-in-Hive/m-p/176455#M67660</guid>
      <dc:creator>kerra</dc:creator>
      <dc:date>2017-09-06T03:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: BLOB with ORC in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/BLOB-with-ORC-in-Hive/m-p/176456#M67661</link>
      <description>&lt;P&gt;Here's the recommendation from a Hive SME:&lt;/P&gt;&lt;P&gt;You should start by checking off the typical recommendations &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.5/bk_hive-performance-tuning/bk_hive-performance-tuning.pdf"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.5/bk_hive-performance-tuning/bk_hive-performance-tuning.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Especially partitioning, depending on how you are accessing your datetime field you may not benefit at all from partitioning pruning.&lt;/P&gt;&lt;P&gt;A safe / proven path is to partition by date and use either an explicit partition key filter or a dimension lookup that allows Hive to infer partition keys from the datetime field.&lt;/P&gt;&lt;P&gt;I don't recall seeing any other specific blob tuning techniques. Ideally you would lazy load the BLOB only if the ID matches but I don't believe there is a way to control that.&lt;/P&gt;&lt;P&gt;One way to get closer to that is to have the ID / datetime mapping in a separate table without the BLOBs. Populating the list of datetimes (query 1) would be faster that way.&lt;/P&gt;&lt;P&gt;Other thoughts:&lt;/P&gt;&lt;P&gt;You should try Hive 2 (in HDP: enable LLAP) which has a bucket pruning optimization, if you cluster by ID it would scan fewer files. I see you are on 2.3 but this could be an incentive to move.&lt;/P&gt;&lt;P&gt;You may try experimenting with ORC stripe sizes.&lt;/P&gt;&lt;P&gt;You might try compressing the blobs to speed the search for a specific ID (if it is a point lookup). The application would need to decompress it.&lt;/P&gt;&lt;P&gt;Long story short, only the 2 pruning options above are system-level optimizations, other than that you are probably looking at dealing with this at the app layer.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 00:52:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/BLOB-with-ORC-in-Hive/m-p/176456#M67661</guid>
      <dc:creator>kerra</dc:creator>
      <dc:date>2017-09-08T00:52:04Z</dc:date>
    </item>
  </channel>
</rss>

