>>> YieldNull
  • /blog
  • /archives
  • /github
  • /about

Blog Entries all / by tag / by year

  • (Go)LevelDB Internals: MemDB

    2022-07-17 18:31:48 / LevelDB /91 hits

    数据在写入 LevelDB 时,并不是立即写入磁盘,而是会先写入内存中,当内存中的数据达到一定数量时,才会写入磁盘。这些内存中的数据统一由 MemDB 来维护,包括数据写入与查询。本文将以 GoLevelDB 源码为例,介绍 MemDB 组件。

    Read more...


  • PostgreSQL Internals: Shared Buffer

    2022-07-09 16:09:43 / PostgreSQL /124 hits

    当你 INSERT 一行记录到 PostgreSQL 时,数据并不会立即写到磁盘文件中,而是会先写入 Shared Buffer,过一段时间才会落盘。同样的,当你 SELECT 一些数据时,也不会每次都会实时从磁盘文件中读取,很大概率会从 Shared Buffer 直接获取。那么 Shared Buffer 内部的结构是怎样的呢?本文将会介绍 Shared Buffer 的工作原理,逐步揭开其神秘面纱。

    Read more...


  • Haystack: 一种分布式对象存储系统

    2022-06-22 23:38:18 / Storage /123 hits

    假如你维护着一个社交媒体公司的图片服务,每天都会有几十亿张照片、缩略图需要存储,还需要快速响应对所有历史照片的随机查询请求,那么你会怎么进行系统设计呢?

    Read more...


  • 浅析KMP算法

    2022-06-08 23:37:33 / Algorithm /153 hits

    Read more...


  • log4j-rce 复现

    2021-12-11 16:15:26 / Java /580 hits

    Read more...


  • PostgreSQL字段对齐规则

    2021-10-16 20:16:49 / PostgreSQL /976 hits

    PostgreSQL在存储一行数据时,会对各个字段进行对齐。在设计表结构时,需要合理安排字段顺序,减少磁盘空间占用。

    postgres=# select typname, typalign, typlen from pg_type where typname in ('int4', 'int8', 'bool', 'float4', 'float8', 'bytea', 'text', 'timestamptz', 'serial', 'json', 'int8[]');
       typname   | typalign | typlen
    -------------+----------+--------
     bool        | c        |      1
     bytea       | i        |     -1
     int8        | d        |      8
     int4        | i        |      4
     text        | i        |     -1
     json        | i        |     -1
     float4      | i        |      4
     float8      | d        |      8
     timestamptz | d        |      8
    (9 rows)postgres=#
    

    Read more...


  • « Previous
  • Next 2 / 11 »

About this site © YieldNull,