:plus1:
挺好的
#18 楼 @42thcoder 哈哈
有意思
#9 楼 @darkbaby123 深得我心 :plus1:
:plus1:
感觉变化不大。。。
:plus1: 健身设施还是挺全的
es6 不是挺好的么?
#3 楼 @happyming9527 rubyweekly 有一篇文章是专门介绍缓存的,写的非常好。其中一部分也是介绍到了 redis 和 memcached 的优缺点。 http://www.nateberkopec.com/2015/07/15/the-complete-guide-to-rails-caching.html?utm_source=rubyweekly&utm_medium=email#memcache-and-dalli
redis 对比 memcached memcached 缺点:
Cache values are limited to 1MB. In addition, cache keys are limited to 250 bytes.
redis 的优点:
Allows different eviction policies beyond LRU Redis allows you to select your own eviction policies, which gives you much more control over what to do when the cache store is full. For a full explanation of how to choose between these policies, check out the excellent Redis documentation.
redis 支持的数据结构类型非常丰富,而且支持多种缓存的失效策略。
Can persist to disk, allowing hot restarts Redis can write to disk, unlike Memcache. This allows Redis to write the DB to disk, restart, and then come back up after reloading the persisted DB. No more empty caches after restarting your cache store!
支持持久化操作,可以进行日志 aof 及 rdb 数据持久化到磁盘。
@psvr 区块链 blockchain
@42thcoder 肯定要去
:plus1:
#3 楼 @xieyunzi http://dev.mysql.com/doc/refman/5.1/en/mysql-use-result.html
After invoking mysql_query() or mysql_real_query(), you must call mysql_store_result() or mysql_use_result() for every statement that successfully produces a result set (SELECT, SHOW, DESCRIBE, EXPLAIN, CHECK TABLE, and so forth). You must also call mysql_free_result() after you are done with the result set.
MySql 在的mysql_query
或mysql_real_query
时候,会调用的mysql_store_result
,会将结果保存到内存中。
mysql_use_result() initiates a result set retrieval but does not actually read the result set into the client like mysql_store_result() does. Instead, each row must be retrieved individually by making calls to mysql_fetch_row(). This reads the result of a query directly from the server without storing it in a temporary table or local buffer, which is somewhat faster and uses much less memory than mysql_store_result().
而mysql_use_result
跳过了这步mysql_store_result
,直接是mysql_fetch_row
,所以会节省很多内存,也不会出现内存不足的情况。
另外一篇文章: http://marksverbiage.blogspot.com/2010/04/streaming-data-from-mysql.html
Unfortunately, this does not do streaming in most cases. Normally most client libraries (which call mysql_store_result) will read the entire result into memory, and you're just going through an already-in-memory data set. This will fail if it doesn't fit in memory. Enter mysql_use_result - if your library can use this instead of mysql_store_result, you can then skip through the records without needing to keep them all in ram at once.
:plus1:
如果一个人在 2000 年 2 月 29 日出生,到了 2001 年 2 月 28 日,算几岁几月几天?
图片可以更新了
罕见啊,我也是庄里的。