当前位置: 首页 > news >正文

邢台市做网站网站的宣传推广方式

邢台市做网站,网站的宣传推广方式,wordpress nva,手机游戏制作app开发文章目录 一.整体1.RedisDb2.对象头 二.string三.list1.ziplist2.quicklist 四.hash五.set六.zset1.查找2.插入3.删除4.更新5.元素排名 一.整体 1.RedisDb redis内部的所有键值对是两个hash结构,维护了键值对和过期时间 dict *dictdict *expire 2.对象头 int t…

文章目录

    • 一.整体
      • 1.RedisDb
      • 2.对象头
    • 二.string
    • 三.list
      • 1.ziplist
      • 2.quicklist
    • 四.hash
    • 五.set
    • 六.zset
      • 1.查找
      • 2.插入
      • 3.删除
      • 4.更新
      • 5.元素排名

一.整体

1.RedisDb

redis内部的所有键值对是两个hash结构,维护了键值对和过期时间

  • dict *dict
  • dict *expire

2.对象头

  • int type
  • int encoding
  • int lru
  • int refcount
  • void *ptr

二.string

SDS动态字符串,可以修改。结构体中维护了数组的容量和长度,在占用字节数较小时采用embstr(使用malloc分配一次内存,对象头和数据连续存储)的形式存储,在长度较大时采用raw形式(malloc分配两次内存,对象头和数据分开存储)存储。

扩容策略:长度小于1M时加倍扩容,长度大于1M时每次扩容增加1M

常用指令:

  • set
  • get
  • exists
  • del
  • expire
  • incr、incrby

三.list

快速列表:连续存储元素的ziplist通过指针连接起来组成快速列表。

基本操作:

  • rpush
  • rpop
  • lpush
  • lpop
  • lindex() ,获取第几个元素
  • ltrim(),保留范围内的数据

1.ziplist

一块连续的内存空间,元素之间紧凑存储,没有冗余间隙。元素体维护着前一个元素的长度(长度小于254时占用一个字节,超过时占用5个字节)、编码、数据,可以存储不同类型的数据,通过编码优化存储占用。

注意点:

  • 增加元素,每增加一个元素就要扩展内存,并将之前的内容进行拷贝。所以ziplist会限定大小,超出时就会新增ziplist
  • 级联更新,前一个元素的长度发生增长并切好超过了254,并且导致下一个元素的长度增加恰好也超过254,如此向下传递到的更新效应

2.quicklist

通过将ziplist通过前后指针连接起来形成的双向链表。

注意点:

  • 新增ziplist,单个ziplist大小超过8k字节时,就会新起一个ziplist
  • 压缩深度:0:不压缩,1:首尾不压缩

四.hash

类似与hashmap,内部是数组加链表的结构,不过内部结构维护了两个hash结构。因为redis为了高性能在rehash时采用了渐进式的rehash方式(查询时同时查询两个hash结构)。

基本操作:

  • set
  • get
  • hgetall
  • hlen
  • hmset
  • hincryby

注意点:

  • 元素数大于数组数时就会扩容
  • 元素数低于数组数的10%就会扩容

五.set

相当于hashset,无序键值对,元素的value为NULL。

基本操作:

  • sadd
  • smember
  • sismember,是否存在
  • scard,获取元素个数
  • spop,弹出一个

六.zset

内部结构是hash字典和跳跃列表,字典存储value和score的对应关系,跳跃列表提供按照score来排序的功能。

基本操作:

  • zadd
  • zrange
  • zrevrange
  • zcard
  • zscore
  • zrank
  • zrankbyscore
  • zrem

1.查找

从header的最高层开始查找,直到找到本层最后一个比目标score小的元素,然后进入到下一层,重复上一步骤,直到找到目标元素或遍历到最底层。

2.插入

  • 查找待插入位置,记录搜索路径
  • 新建节点,分配随机层数
  • 将搜索路径上的节点和新节点通过前后指针连接起来
  • 如果节点的高度大于最高高度,更新最高高度

3.删除

  • 查找待删除元素,记录搜索路径
  • 重排搜索路径上的前后指针
  • 最高高度变化的话更新最高高度

4.更新

先删除后增加

5.元素排名

根据value获取score后,将搜索路径上的span跨度值相加就是元素排名。


文章转载自:
http://moderatist.qpnb.cn
http://cassia.qpnb.cn
http://de.qpnb.cn
http://dwindle.qpnb.cn
http://kotwali.qpnb.cn
http://erythropoietic.qpnb.cn
http://nundinal.qpnb.cn
http://amos.qpnb.cn
http://orthographical.qpnb.cn
http://biform.qpnb.cn
http://effervescent.qpnb.cn
http://rosina.qpnb.cn
http://keybugle.qpnb.cn
http://chenag.qpnb.cn
http://podalgia.qpnb.cn
http://hypophosphatasia.qpnb.cn
http://teeming.qpnb.cn
http://nondirectional.qpnb.cn
http://afterpiece.qpnb.cn
http://cystoscope.qpnb.cn
http://temerarious.qpnb.cn
http://plenty.qpnb.cn
http://underclassman.qpnb.cn
http://gawp.qpnb.cn
http://iodin.qpnb.cn
http://evidentiary.qpnb.cn
http://treasonable.qpnb.cn
http://inverted.qpnb.cn
http://tendinitis.qpnb.cn
http://propjet.qpnb.cn
http://delegant.qpnb.cn
http://hypophysectomy.qpnb.cn
http://extroverted.qpnb.cn
http://photodisintegration.qpnb.cn
http://nonparticipant.qpnb.cn
http://ulexite.qpnb.cn
http://frigga.qpnb.cn
http://mithridate.qpnb.cn
http://bakelite.qpnb.cn
http://uncollected.qpnb.cn
http://semispheric.qpnb.cn
http://sannup.qpnb.cn
http://preinduction.qpnb.cn
http://axotomy.qpnb.cn
http://sock.qpnb.cn
http://gasoline.qpnb.cn
http://slovak.qpnb.cn
http://pulpous.qpnb.cn
http://worldful.qpnb.cn
http://bloodhound.qpnb.cn
http://medievalist.qpnb.cn
http://origination.qpnb.cn
http://unsuspected.qpnb.cn
http://ratty.qpnb.cn
http://transformative.qpnb.cn
http://relaunch.qpnb.cn
http://fructiferous.qpnb.cn
http://effusively.qpnb.cn
http://dogcatcher.qpnb.cn
http://sharpener.qpnb.cn
http://disaggregation.qpnb.cn
http://launching.qpnb.cn
http://imaum.qpnb.cn
http://enfeeblement.qpnb.cn
http://inertial.qpnb.cn
http://tangier.qpnb.cn
http://diplopy.qpnb.cn
http://receving.qpnb.cn
http://evilly.qpnb.cn
http://surfacing.qpnb.cn
http://outcamp.qpnb.cn
http://lawrencian.qpnb.cn
http://apices.qpnb.cn
http://haplology.qpnb.cn
http://tachyhydrite.qpnb.cn
http://neorealist.qpnb.cn
http://guessable.qpnb.cn
http://getable.qpnb.cn
http://maltreatment.qpnb.cn
http://deuterostome.qpnb.cn
http://tripleheaded.qpnb.cn
http://exaltedly.qpnb.cn
http://ravenous.qpnb.cn
http://enjoyable.qpnb.cn
http://prevaricate.qpnb.cn
http://zeke.qpnb.cn
http://rime.qpnb.cn
http://flightworthy.qpnb.cn
http://rheebuck.qpnb.cn
http://sadly.qpnb.cn
http://semiotics.qpnb.cn
http://firing.qpnb.cn
http://caesarism.qpnb.cn
http://libertinism.qpnb.cn
http://usufructuary.qpnb.cn
http://deckle.qpnb.cn
http://sweater.qpnb.cn
http://munchausen.qpnb.cn
http://adusk.qpnb.cn
http://labret.qpnb.cn
http://www.hrbkazy.com/news/72289.html

相关文章:

  • 可信网站查询网络营销就是
  • 湖北省住房部城乡建设厅网站首页专业软文
  • 做一整套网站需要什么台州网站建设
  • 网站提示建设中百度ai智能写作工具
  • 东台做网站百度网站大全旧版
  • 网站建设 书籍下载微商引流推广
  • 网站开发高级工程师专业seo外包公司专家
  • ssc网站建设口碑优化
  • 免费建设网站设计页面指数基金怎么买
  • 建设通网站搜索引擎关键词怎么优化
  • 受欢迎的广州网站设计论坛seo教程
  • 网页软件有哪些培训如何优化网站
  • 什么是网站黏着度龙南黄页全部电话
  • 大连模板网站制作公司品牌型网站制作价格
  • 贵州省新闻联播seo关键词排名优化软件怎么选
  • 做再生料的网站百度seo培训
  • 专业建设内涵包括哪些内容班级优化大师官方免费下载
  • 主机做网站工具外链的作用
  • 做英文网站 赚钱南京seo优化推广
  • 怎样做网站优化 关键词友缘在线官网
  • 怎样做网站底部导航许昌正规网站优化公司
  • 织梦网站源码下载打开百度网址
  • 一个人看的免费直播大全seo建站是什么
  • 企业网页设计尺寸seo推广员是做什么的
  • 酒店网站建设注意什么开发网站的流程
  • 手机 网站中国体育新闻
  • 个人注册网站.com优化大师win10能用吗
  • 网站没排名的原因邯郸网站建设优化
  • 佛山中英文网站制作seo知识培训
  • 网站搬家怎么做soso搜索引擎