Tpc-ds Generating Data

Source: Internet
Author: User
Introduction

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

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

Here is a simple description of the steps generated, a good memory than a bad pen.


Build Step


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


2. Unzip: Download the zip file on Linux and unzip it and go to his tools directory.


3. Compile: Make (ignore compilation warnings and ensure that the build process completes successfully). This requires Linux to be installed on GCC, gcc C + +, expect and so on.


4. Generate Data: Execute in the Tools directory:./dsdgen-scale 5-force (-force: Overwrites the original generated data, otherwise not overwritten); the generated 25. dat file.


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


6. Put the data file for each. dat 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;


With the above six steps, you can load all the TPC-DS data into the corresponding table and generate 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 My.ini
Sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution"
Remove the strict_trans_tables, and then restart MySQL to be OK.


Way two:
A. select @ @sql_mode; See which modes are available.


B.set @ @sql_mode =no_engine_substitution,...; Do not strict_trans_tables the pattern just fine.


Errors may also appear, there will be many, depends on how you deal with, the back of the re-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.