解决办法 1.批量写入 [crayon-641e22b678dcc34461309 […]

解决办法 1.批量写入 [crayon-641e22b678dcc34461309 […]
数据库优化最常用的命令就是用explain查看一下写的sql是否用到了索引: 如: (root@localho […]
hash+sort
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
redis148.akctest1.com:0>hmset good_info_1 price 20 weight 3 "OK" redis148.akctest1.com:0>hmset good_info_2 price 40 weight 5 "OK" redis148.akctest1.com:0>hmset good_info_3 price 30 weight 1 "OK" redis148.akctest1.com:0>sort gid by good_info_*->price redis148.akctest1.com:0>lpush gid 1 "1" redis148.akctest1.com:0>lpush gid 2 "2" redis148.akctest1.com:0>lpush gid 3 "3" redis148.akctest1.com:0>sort gid by good_info_*->price 1) "1" 2) "3" 3) "2" redis148.akctest1.com:0>sort gid by good_info_*->weight 1) "3" 2) "1" 3) "2" redis148.akctest1.com:0> |
sortSet [cra […]
1 2 3 4 5 6 |
#show variables like 'max_connections' 查询最大连接 #show status like 'Threads%';查看当前线程状态 #set global max_connections=1400; 设置最大连接 #show processlist; 查询现有连接 #SHOW TABLE STATUS FROM 库名LIKE '表名' 查看某张表的状态 #show status; -- 显示一些系统特定资源的信息,例如,正在运行的线程数量。 |
#拼装两个表进行查询 select total_stu.school_name,total_stu.total […]
分布式锁是有用的在多个程序以相互独享的方式访问共享资源时。 有很多的库和书籍介绍如何使用redis的分布式锁, […]
基于redis实现分布式锁 在很多环境中不同的进程需要以排他性的方式占用共享资源,此时分布锁就成为一项很有用且 […]
Distributed locks with Redis Distributed locks are a ve […]
该文档是一篇关于redis集群的教程。该教程并不会让你去理解复杂分布式系统概念,只会告诉你如何安装、测试和操作 […]
一:Redis集群搭建 1. 下载 首先去官网下载较新的3.2.0版本,下载方式还是非常简单的,比如官网介绍的 […]