Consultation on Alternatives to TiDB Stored Procedures

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

Original topic: TIDB存储过程替代方案请教

| username: 江湖故人

【TiDB Usage Environment】Testing
【TiDB Version】7.4
TiDB does not support functions and stored procedures, and of course, it also does not support anonymous blocks. I need to generate some test data with the following requirements. Is there any simple way to do this?

begin
declare l_n1 int default 1;
   while l_n1 <= 1000000 DO
     insert into big_table values (l_n1, substring(md5(rand()), 1, 4));
     set l_n1 = l_n1 + 1;
   end while;
end;
| username: xfworld | Original post link

The commercial version of PingCAP database supports stored procedures.

Link:


The open-source version can only rely on applications or services to meet your needs and expectations.

| username: heiwandou | Original post link

The open-source version doesn’t have this feature.

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

If it’s temporary data generation, you can write a loop in the shell and add insert statements within the loop.

| username: Kongdom | Original post link

You can consider ETL tools, such as Kettle.

| username: Fly-bird | Original post link

Write one yourself, and then trigger it periodically to inject it.

| username: system | Original post link

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