zoukankan      html  css  js  c++  java
  • SCAN和KEYS 区别

    Warning: consider KEYS as a command that should only be used in production environments with extreme care. It may ruin performance when it is executed against large databases. 
    
    This command is intended for debugging and special operations, such as changing your keyspace layout. Don’t use KEYS in your regular application code. If you’re looking for a 
    
    way to find keys in a subset of your keyspace, consider using SCAN or sets.
    
    警告;考虑KEYS 作为一个命令行用于生产环境需要非常小心。
    
    它可以破坏性能当它是被执行在大的数据库上,
    
    这个命令是用于调试和指定的操作,比如改为你的keyspace 的位置。
    
    不要使用KEYS 在你的常规应用程序。
    
    如果你寻找一种方式来找到keys 在你的keyspace的子集,考虑或者SCAN 或者sets
    
    
    [root@node01 ~]#  redis-cli -a 'r,uLgt.313' --scan
    a4
    a1
    a5
    user1
    foo
    user2
    list
    wangpin
    set-key
    key
    hash-key
    bb
    a
    aa
    a6
    a3
    mycounter
    
    
    注意 head -10 是用于为只打印头几行。
    
    Scanning 是可以使用底层的模式匹配SCAN 命令的能力 使用--pattern option.
    
    [root@node01 ~]#  redis-cli -a 'r,uLgt.313' --scan --pattern 'a*'
    a4
    a1
    a5
    a
    aa
    a6
    a3

  • 相关阅读:
    hdu 1423 LICS
    poj 1135
    poj 1112
    poj 1087
    poj 1094
    谷歌浏览器字体小于12px不能正常显示bug
    gulpfile.js配置 实现ctrl+s自动编译和刷新浏览器
    <hr>标签横线的颜色
    jQuery轮播图鼠标移入停止,移出播放,点击小横条切换图片
    最简单的jq轮播图
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349667.html
Copyright © 2011-2022 走看看