Analysis on the reasons of poor query performance Kylin

Source: Internet
Author: User

When dealing with exponential market data (IDXD), I encountered a Kylin performance query problem, very strange. After some research has found the reason and successfully solved:

Symptoms:

Select COUNT (*) from SENSITOP.IDXD where ticker = ' 000300 ' and tradedate between ' 2016-01-01 ' and ' 2016-07-01 '
Soon, less than a second

SELECT * from SENSITOP.IDXD where ticker = ' 000300 ' and tradedate between ' 2016-01-01 ' and ' 2016-07-01 '
It's slow, takes more than 50 seconds, and sometimes times out.

Analysis:

Since count is very fast, the description of retrieving the cube itself is very fast, and the problem may be in getting the data, possibly the problem of reading the data, need to check the cube's settings

Solve:

Discovery by default, the Tradedate field in the cube is Dict, and the performance issue is resolved when you change to date.

?

Conclusion:

This should be a problem with deserialization. When the cube is retrieved, it is indexed, and then the data needs to be read from the disk and deserialized into an object. For Tradedate, there is a significant performance difference between Dict's encoding and the encoding of date. This point deserves our attention!

Analysis on the reasons of poor query performance Kylin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.