Hive Web query statement insert MySQL database times wrong

Source: Internet
Author: User

Recently, users have complained that the hive Web client does not return results to the front end after submitting some queries, such as a statement that joins five tables, and only one join is removed.

Query to write a temporary table, and then join the last table to do.

I later debug, the Discovery statement is really successful execution, and the result file has been dump into the Hive Web Local system files, which is a bit strange, is not the output format or the result

There is a dirty word, after the exclusion of other possible problems, and ultimately to the query to write back to the MySQL DB logic, because the need to save the user submitted query, execution time, the result file path for users two times to view the download, after the statement execution,

This information is written to MySQL through the ORM Framework (MyBatis), but before the Hivequery field in MySQL was designed, the user would write a lengthy statement, and varchar (1000) was set, which means that query saved up to 1000 characters. If the error is more than 1000 characters, this causes the execution of the statement to be successful, but the difference in the last plug on the gas of MySQL, the entire execution failed.

VarChar is a mysql character variable-length type that can be specified in lengths ranging from 0 to 65535, but we can also use the text type (the text is stored out the table with the table just has a pointer to T He location of the actual storage), the maximum length is also 65535, I modify the column schema in SQLyog to varchar (65535) It will automatically help me switch to the text type, after changing the schema, Before long query will be able to successfully insert DB.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/extra/

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.