List:General Discussion« Previous MessageNext Message »
From:Sergey Seroukhov Date:April 26 1999 2:41pm
Subject:Fill tables with a random data
View as plain text  
                         Hello, All!

  Sorry, if I can't write here.
  I made a simple program to do subj. If anybody need it, you can
get the program from
  Program is freeware.


"MySQL Packet Runner" can help you to do:
- define total and averange execute time of 
  a random query;
- fill your table with a random data and random
  field values from another tables.

  This program is freeware. It is made for Windows 
and isn't use ODBC or BDE.

Program execute a query with defined times. Using several
simple templates you can insert into standart MySQL
query a random data. Formats is:

%<n>d - insert a random integer in range [0..n]
Example: %10d -> 5

%<n>f - insert a random float value in range [0..n]
Example: %100f -> 33.78

%<n>s - insert a random string with length n
Example: %5s -> "sOj^8L"

%<n>t - insert a random date which [0..n] later by now
Example: %10d -> "1999-04-12" (now is "1999-04-22")

%<n>q - insert a first field from random record from 
      subquery number n. Subqueries are marked by 
      '1:','2:'.. in a form. 
        You can use only 5 subqueries. Subquery can 
      include described templates except %<n>q.
  1: SELECT LoginNo FROM Logins WHERE Login LIKE %1s

  General Query:

  INSERT INTO AccessLogs VALUES (NULL,%1q,%30t,%2q,%12s)

Results may be folowing:

  INSERT INTO AccessLogs VALUES (NULL,"10","1999-01-03",

  INSERT INTO AccessLogs VALUES (NULL,"3","1999-02-01",


NOTE: SubQueries will execute once per process!


				With best wishes, Sergey Seroukhov
Networks Lab. ASU DSTU <voland@stripped>

Fill tables with a random dataSergey Seroukhov26 Apr