ERROR 1045 (28000): Access denied for user 'root'@'localhost'
(using password: YES) ERROR 2013 (HY000): Lost connection to
MySQL server during query ...
【mysql】 【数据库】 【shell】 【解决方案】 【Server】 【update】 【Access】 点击查看原文>
Jan
21
2014
Jan
06
2014
Dec
20
2013
Nov
18
2013
Oct
09
2013
redis sorted sets demo
下面讲一个使用 Sorted Sets 的例子
mysql中有一张表,假设名字为 summary_data吧,记录数为30M左右,
有一个字段first_path 为varchar(256),需要找到出现次数最多的10个first_path。
方法一 ) 直接sql语句
sql语句很好写:
SELECT first_path, COUNT(*) AS c FROM summary_data GROUP BY first_path ORDER BY c DESC LIMIT 10; |
表上面是有索引的, 但是索引的长度为 KEY `first_path` (`first_path`(255)),
也许是这个原因导致了无法使用索引:
id: 1
select_type: SIMPLE
table: summary_data
type: ALL
possible_keys: NULL
key: NULL
key_len: NULL
ref: NULL
rows: 28136948
Extra: Using temporary; Using filesort
这条sql运行了9分钟。
…
[获取更多]
Sep
25
2013
Mar
04
2013
Feb
01
2013
Jan
22
2013
Jan
22
2013