摘要: apt install libjemalloc-dev 在相应账户的.bashrc或者.bash_aliases里 export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so 注意查一下.so的路径,让LD_PRELOAD指向你的jemall 阅读全文
posted @ 2020-08-25 14:28 大城小爱012 阅读(846) 评论(0) 推荐(0)
摘要: select name, st_distance( point(113.327955,23.129717), point )*111195 as distance, address from table1 where st_distance(point(113.327955,23.129717),p 阅读全文
posted @ 2020-08-25 13:38 大城小爱012 阅读(165) 评论(0) 推荐(0)
摘要: update user_info set user_name = concat(user_name,'呵呵呵') where user_name = '哈哈哈'; 阅读全文
posted @ 2020-08-25 13:36 大城小爱012 阅读(323) 评论(0) 推荐(0)
摘要: 更改数据库编码: ALTER DATABASE caitu99 CHARACTER SET `utf8mb4` COLLATE `utf8mb4_bin`; 更改表编码: ALTER TABLE `TABLE_NAME` CONVERT TO CHARACTER SET `utf8mb4` COLL 阅读全文
posted @ 2020-08-25 13:35 大城小爱012 阅读(131) 评论(0) 推荐(0)
摘要: with open(birth_weight_file,'w') as f: writer=csv.writer(f) writer.writerow(birth_header) writer.writerows(birth_data) f.close() 这种写法最终的结果就是生成的csv文件每两 阅读全文
posted @ 2020-08-25 13:34 大城小爱012 阅读(677) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-08-25 13:32 大城小爱012 阅读(323) 评论(0) 推荐(0)
摘要: 1. 修改/etc/sysctl.conf, 加入 fs.file-max = 6553560 2.系统默认的ulimit对文件打开数量的限制是1024,修改/etc/security/limits.conf并加入以下配置,永久生效 * soft nofile 65535 * hard nofile 阅读全文
posted @ 2020-08-25 13:31 大城小爱012 阅读(226) 评论(0) 推荐(0)
摘要: 创建索引的时候设置PUT twitter { "settings" : { "index" : { "number_of_shards" : 3, "number_of_replicas" : 2 } } } 注意把分片大小控制在50GB左右 阅读全文
posted @ 2020-08-25 12:57 大城小爱012 阅读(1381) 评论(0) 推荐(0)
摘要: curl -X POST http://example.com:9200/my_index/_close curl -X POST http://example.com:9200/my_index/_open 阅读全文
posted @ 2020-08-25 12:56 大城小爱012 阅读(545) 评论(0) 推荐(0)
摘要: #!/bin/sh docker run -itd --name nginx --restart=always -p 80:80 \ -v /etc/localtime:/etc/localtime \ -v /root/nginx/conf:/etc/nginx \ -v /root/nginx/ 阅读全文
posted @ 2020-08-25 12:31 大城小爱012 阅读(160) 评论(0) 推荐(0)