Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5298

Investigate and fix from_unixtime() slowness, currently 100x slower than scanning Bigint

    XMLWordPrintableJSON

Details

    • ghx-label-4

    Description

      Noticed that applying from_unixtime against a Bigint results in ~100x slowdown compared to just scanning the Bigint column

      select max(from_unixtime (l_orderkey)) from lineitem where l_shipdate < "1993-01-01"
      Fetched 1 row(s) in 75.67s
      
      select max (l_orderkey) from lineitem where l_shipdate < "1993-01-01"
      Fetched 1 row(s) in 0.87s
      
      Function / Call Stack	CPU Time
      std::basic_ios<char, std::char_traits<char>>::init	36.50%
      std::basic_ios<char, std::char_traits<char>>::imbue	10.50%
      std::__ostream_insert<char, std::char_traits<char>>	7.10%
      std::ostream::_M_insert<long>	4.90%
      std::locale::locale	4.00%
      operator delete	3.40%
      std::locale::~locale	2.80%
      std::ostream::operator<<	2.60%
      operator new	2.40%
      std::ostream::operator<<	2.00%
      std::ostream::operator<<	1.80%
      __tz_convert	1.70%
      std::ios_base::ios_base	1.50%
      impala::TimestampValue::DebugString	1.40%
      impala::Tuple::IsNull	1.30%
      [Import thunk std::basic_streambuf<char, std::char_traits<char>>::xsputn]	0.90%
      std::locale::classic	0.90%
      boost::detail::lexical_converter_impl<std::string, impala::TimestampValue>::try_convert	0.80%
      

      Attachments

        1. Screen Shot 2017-05-09 at 5.26.30 PM.png
          1.00 MB
          Mostafa Mokhtar
        2. hotspots.csv
          310 kB
          Mostafa Mokhtar
        3. top-down.csv
          2.03 MB
          Mostafa Mokhtar

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mmokhtar Mostafa Mokhtar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: