Tpc-ds Generate Data

Source: Internet
Author: User
Brief Introduction

In fact, the use of TPC-DS to generate system performance test data, said simple is simple, difficult to say, it is not really good to do.

The key is that in each step of the operation, if you encounter problems, how to deal with, this is the key to the problem.

The following is a simple description of the generated steps, a good memory is not as bad as a pen.


Build Steps


1. On the official website (http://www.tpc.org/tpcds/) to download the latest: Tpc-ds.


2. Decompression: Download the zip file on Linux to unzip and enter his tools directory.


3. Compile: Make (ignore compilation warnings, only ensure that the build process completes successfully). Linux is required to install GCC, gcc C + +, expect and so on.


4. Generate data: In the Tools directory to execute:./dsdgen-scale 5-force (-force: Will overwrite the original generated data, otherwise not overwritten); the resulting 25. DAT data files.


5. Create the corresponding table, command: Mysql-u <your_mysql_user>-P < Tpcds.sql <your_db_name> This is an example of MySQL. Enter the password,
Wait for the execution to complete, and the corresponding 25 tables will be generated in your your_db_name.


6. Put each. dat data file into the corresponding database, using the following command:
LOAD DATA INFILE ' your_dat_filename ' into TABLE table_the_dat_file_is_for FIELDS terminated by ' | ' LINES terminated by ' \ n '
Your_dat_filename:*.dat;
Table_the_dat_file_is_for:tablename;


Through the above six steps, the TPC-DS data can be all load to the corresponding table, also generated the corresponding test data.


errors that may occur


1.1292 (22007): Incorrect date value: ' For column ' Wp_rec_end_date ' at row 1


Way one: found in the My.ini.
Sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution"
Get rid of the strict_trans_tables, then restart MySQL, OK.


Mode two:
A. select @ @sql_mode; See which patterns are available.


B.set @ @sql_mode =no_engine_substitution,...; Do not strict_trans_tables the mode is good.


Mistakes may also appear, there will be a lot of it depends on how you deal with, and then fill up ...

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.