当前位置: 首页 > news >正文

做模式网站上海十大建筑设计事务所

做模式网站,上海十大建筑设计事务所,网站为什么被降权,中国建设银行官网站企业网银下载在看MySQL文章的时候偶然发现生成数据的工具#xff0c;此处直接将软件作者的文档贴了过来#xff0c;说明了使用方式及下载地址 Random data generator for MySQL Many times in my job I need to generate random data for a specific table in order to reproduce an is…在看MySQL文章的时候偶然发现生成数据的工具此处直接将软件作者的文档贴了过来说明了使用方式及下载地址 Random data generator for MySQL Many times in my job I need to generate random data for a specific table in order to reproduce an issue. After writing many random generators for every table, I decided to write a random data generator, able to get the table structure and generate random data for it. Plase take into consideration that this is the first version and it doesn’t support all field types yet! NOTICE This is an early stage project. Supported fields: Field typeGenerated valuestinyint0 ~ 0xFFsmallint0 ~ 0XFFFFmediumint0 ~ 0xFFFFFFint - integer0 ~ 0xFFFFFFFFbigint0 ~ 0xFFFFFFFFFFFFFFFFfloat0 ~ 1e8decimal(m,n)0 ~ 10^(m-n)double0 ~ 1000char(n)up to n random charsvarchar(n)up to n random charsdateNOW() - 1 year ~ NOW()datetimeNOW() - 1 year ~ NOW()timestampNOW() - 1 year ~ NOW()time00:00:00 ~ 23:59:59yearCurrent year - 1 ~ current yeartinyblobup to 100 chars random paragraphtinytextup to 100 chars random paragraphblobup to 100 chars random paragraphtextup to 100 chars random paragraphmediumblobup to 100 chars random paragraphmediumtextup to 100 chars random paragraphlongblobup to 100 chars random paragraphlongtextup to 100 chars random paragraphvarbinaryup to 100 chars random paragraphenumA random item from the valid items listsetA random item from the valid items list How strings are generated If field size 10 the program generates a random “first name”If the field size 10 and 30 the program generates a random “full name”If the field size 30 the program generates a “lorem ipsum” paragraph having up to 100 chars. The program can detect if a field accepts NULLs and if it does, it will generate NULLs ramdomly (~ 10 % of the values). Usage mysql_random_data_load database table number of rows [options...] Options OptionDescription–bulk-sizeNumber of rows per INSERT statement (Default: 1000)–debugShow some debug information–fk-samples-factorPercentage used to get random samples for foreign keys fields. Default 0.3–hostHost name/ip–max-fk-samplesMaximum number of samples for fields having foreign keys constarints. Default: 100–max-retriesMaximum number of rows to retry in case of errors. See duplicated keys. Deafult: 100–no-progressbarSkip showing the progress bar. Default: false–passwordPassword–portPort number–PrintPrint queries to the standard output instead of inserting them into the db–userUsername–versionShow version and exit Foreign keys support If a field has Foreign Keys constraints, random-data-load will get up to --max-fk-samples random samples from the referenced tables in order to insert valid values for the field. The number of samples to get follows this rules: 1. Get the aproximate number of rows in the referenced table using the rows field in: EXPLAIN SELECT COUNT(*) FROM referenced schema.referenced table1.1 If the number of rows is less than max-fk-samples, all rows are retrieved from the referenced table using this query: SELECT referenced field FROM referenced schema.referenced table1.2 If the number of rows is greater than max-fk-samples, samples are retrieved from the referenced table using this query: SELECT referenced field FROM referenced schema.referenced table WHERE RAND() fk-samples-factor LIMIT max-fk-samplesExample CREATE DATABASE IF NOT EXISTS test;CREATE TABLE test.t3 (id int(11) NOT NULL AUTO_INCREMENT,tcol01 tinyint(4) DEFAULT NULL,tcol02 smallint(6) DEFAULT NULL,tcol03 mediumint(9) DEFAULT NULL,tcol04 int(11) DEFAULT NULL,tcol05 bigint(20) DEFAULT NULL,tcol06 float DEFAULT NULL,tcol07 double DEFAULT NULL,tcol08 decimal(10,2) DEFAULT NULL,tcol09 date DEFAULT NULL,tcol10 datetime DEFAULT NULL,tcol11 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,tcol12 time DEFAULT NULL,tcol13 year(4) DEFAULT NULL,tcol14 varchar(100) DEFAULT NULL,tcol15 char(2) DEFAULT NULL,tcol16 blob,tcol17 text,tcol18 mediumtext,tcol19 mediumblob,tcol20 longblob,tcol21 longtext,tcol22 mediumtext,tcol23 varchar(3) DEFAULT NULL,tcol24 varbinary(10) DEFAULT NULL,tcol25 enum(a,b,c) DEFAULT NULL,tcol26 set(red,green,blue) DEFAULT NULL,tcol27 float(5,3) DEFAULT NULL,tcol28 double(4,2) DEFAULT NULL,PRIMARY KEY (id) ) ENGINEInnoDB;To generate 100K random rows, just run: mysql_random_data_load test t3 100000 --userroot --passwordrootmysql select * from t3 limit 1\G *************************** 1. row ***************************id: 1 tcol01: 10 tcol02: 173 tcol03: 1700 tcol04: 13498 tcol05: 33239373 tcol06: 44846.4 tcol07: 5300.23 tcol08: 11360967.75 tcol09: 2017-09-04 tcol10: 2016-11-02 23:11:25 tcol11: 2017-03-03 08:11:40 tcol12: 03:19:39 tcol13: 2017 tcol14: repellat maxime nostrum provident maiores ut quo voluptas. tcol15: Th tcol16: Walter tcol17: quo repellat accusamus quidem odi tcol18: esse laboriosam nobis libero aut dolores e tcol19: Carlos Willia tcol20: et nostrum iusto ipsa sunt recusa tcol21: a accusantium laboriosam voluptas facilis. tcol22: laudantium quo unde molestiae consequatur magnam. tcol23: Pet tcol24: Richard tcol25: c tcol26: green tcol27: 47.430 tcol28: 6.12 1 row in set (0.00 sec)效果良好 How to download the precompiled binaries There are binaries available for each version for Linux and Darwin. You can find compiled binaries for each version in the releases tab: https://github.com/Percona-Lab/mysql_random_data_load/releases
http://www.w-s-a.com/news/113308/

相关文章:

  • 网站做的最好的公司行业网址大全
  • 内网怎么做网站服务器seo统计
  • 丽水市企业网站建设 微信营销 影视拍摄计算机专业吃香吗
  • 龙岗做网站公司哪家好找到做网站的公司
  • 网站图片alt属性wordpress 自定义栏目 调用
  • 怎样建网站最快广州网站建设工程
  • iis7 网站404错误信息12306网站很难做吗
  • 网站建设600元包公司设计图片大全
  • 网站建设费用怎么做分录做校园网站代码
  • 网站改版做重定向福州网站建设思企
  • 网站建设全流程企业形象网站开发业务范畴
  • wordpress无法查看站点西安优秀高端网站建设服务商
  • 固始网站制作熟悉免费的网络营销方式
  • 做网站到a5卖站赚钱搜索引擎优化代理
  • 沈阳网站建设包括win10优化
  • 做百度手机网站点击软网站seo优化徐州百度网络
  • 徐州专业网站制作标志设计作业
  • 自己可以做网站空间吗海天建设集团有限公司网站
  • 教学督导网站建设报告aspcms网站图片不显示
  • 网站开发公司成本是什么门户网站宣传方案
  • 上海 企业网站建设网站怎么开通微信支付
  • 饮料网站建设wordpress主题猫
  • 网站建设需要编码不有没有专门的网站做品牌授权的
  • 做爰在线网站免费空间列表
  • 网站外链建设工作总结郑州网站建设扌汉狮网络
  • 建设企业网站的需要多长时间网站使用说明书模板
  • 建网站首页图片哪里找263企业邮箱网页版登录
  • 盐城网站建设电话高端定制网站
  • 成都网站seo技术施工企业样板先行制度
  • 高端网站建设电话河北建筑工程信息网站