How to Batch Generate Data in TiDB

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 请问大家TiDB怎么批量造数

| username: TiDBer_QHSxuEa1

I would like to ask everyone, what methods does TiDB have for generating data in bulk?

| username: Soysauce520 | Original post link

tpcc

| username: 啦啦啦啦啦 | Original post link

Or tools like sysbench for MySQL can also be used.

| username: redgame | Original post link

Stress testing tool

| username: zhanggame1 | Original post link

Do you use Navicat? Right-click the table, then generate data, select the amount of data, it’s especially fast.

| username: 像风一样的男子 | Original post link

Write a script to loop through and execute insert statements. It’s best to have multiple rows of data in a single insert statement.

| username: db_user | Original post link

Any benchmarking tool will do if there are no special requirements.

| username: Anna | Original post link

You can try this: 专栏 - 通过Jmeter批量向TiDB数据库插入数据 | TiDB 社区

| username: Anna | Original post link

Batch Insert Data into TiDB Database Using Jmeter

| username: Ming | Original post link

For TiDB, you can directly use tiup bench to create TPC-C and TPC-H.

| username: linnana | Original post link

The Jmeter tool seems a bit complicated to use.

| username: Anna | Original post link

Do you have any other recommended tools?

| username: TiDB_C罗 | Original post link

Use a CTE expression to generate test data recursively.

| username: TiDBer_QHSxuEa1 | Original post link

Thank you, this feature is only available in Navicat 16. I have tried it, and it is indeed very useful.

| username: TiDBer_QHSxuEa1 | Original post link

Okay, I’ll give it a try.

| username: coderv | Original post link

The most old-fashioned way is to write a script :grinning:

| username: Kongdom | Original post link

:+1: :+1: :+1: This method is awesome.

| username: cassblanca | Original post link

TPCC BENCHMARK; or use other scripting languages; development tools like Navicat Premium, PLSQL Developer, etc., all have data generation functions.

| username: zhanggame1 | Original post link

This script is best as a stored procedure, but the problem is that TiDB doesn’t support it, so we have to use another programming language to write it.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.