谈谈MYSQL那点事
查询缓存区的最大长度,按照当前需求,一 倍一倍增加,本选项比较重要 sort_buffer_size 512K 128M 每个线程的排序缓存大小,一般按照内存可 以设置为 2M 以上,推荐是 16M ,该选项对 排序 order by , group by 起作用 record_buffer 128K 64M 每个进行一个顺序扫描的线程为其扫描的每 张表分配这个大小的一个缓冲区,可以设置 为 2M 以上 table_cache 可以考虑全文索引 可以考虑全文索引 频繁更新的列不适合建立过多索引 频繁更新的列不适合建立过多索引 应用优化 应用优化 索引建立原则(二) 索引建立原则(二) order by order by 字句中的字段, 字句中的字段, where where 子句中字段,最常用的 子句中字段,最常用的 sql select *, select *, 只取需要的字段 只取需要的字段 对于大数据量的查询,尽量避免在 对于大数据量的查询,尽量避免在 SQL SQL 语句中使用 语句中使用 order by order by 字句,避 字句,避 免 免 额为的开销 额为的开销 采用连接操作,避免过多的子查询,产生的 采用连接操作,避免过多的子查询,产生的 CPU CPU 和 和0 码力 | 38 页 | 2.04 MB | 1 年前3C++20: An (Almost) Complete Overview
once faster build times Preprocessor macros have no effect on, and never leak from, modules Order of module imports is not important8 Modules Create a module: // cppcon.cppm – Module Interface constant ❌73 constinit Static initialization order fiasco Variables with static storage and dynamic initializers bugs due to undefined order of dynamic initializations ❌ Static variables0 码力 | 85 页 | 512.18 KB | 5 月前3C++高性能并行编程与优化 - 课件 - 06 TBB 开启的并行编程之旅
,这样可以避免 t2 闲置浪费时间。总之就是会自动负载均衡非常智能,完全无需操心内部 细节。 流水线并行: filter 参数 • serial_in_order 表示当前步骤只允许串行执行,且 执行的顺序必须一致。 • serial_out_of_order 表示只允许串行执行,但是顺 序可以打乱。 • parallel 表示可以并行执行当前步骤,且顺序可以 打乱。 • 每一个步骤( filter0 码力 | 116 页 | 15.85 MB | 1 年前3C++高性能并行编程与优化 - 课件 - 07 深入浅出访存优化
data is not contiguous? • The Morton order is a mapping of multidimensional data to one dimension that preserves locality of the data. This is also known as Z-order. When using this ordering, for example0 码力 | 147 页 | 18.88 MB | 1 年前3Что нужно знать об архитектуре ClickHouse, чтобы его эффективно использовать
count(*) AS count FROM hits WHERE CounterID = 1234 AND Date >= today() - 7 GROUP BY Referer ORDER BY count DESC LIMIT 10 Типичный запрос в системе веб-аналитики Быстро читаем › Только нужные столбцы:0 码力 | 28 页 | 506.94 KB | 1 年前3ClickHouse: настоящее и будущее
Semistructured Data 28 Example: NBA games dataset CREATE TABLE games (data String) ENGINE = MergeTree ORDER BY tuple(); SELECT JSONExtractString(data, 'teams', 1, 'name') FROM games; — 0.520 sec. CREATE0 码力 | 32 页 | 2.62 MB | 1 年前3RustBelt - Rust 的形式化语义模型
for Programming Languages and Systems, ETH Zürich RustBelt Project Background Iris: A Higher-Order Concurrent Separation Logic Framework RustBelt: Securing the Foundations of the Rust Programming0 码力 | 21 页 | 2.63 MB | 1 年前3No Silver Bullet – Essence and Accident in Software Engineering
single development, in either technology or management technique, which by itself promises even one order-of- magnitude improvement within a decade in productivity, in reliability, in simplicity.”Abstract0 码力 | 35 页 | 1.43 MB | 5 月前3hazard pointer synchronous reclamation
consider the asynchronous reclamation of object A’ that leads to locking shards 1 and 0 in the reverse order. • DEADLOCK • We cannot shard the domain cohort object list (or can we?) Wait. You Said Fast and0 码力 | 31 页 | 856.38 KB | 5 月前3Lock-Free Atomic Shared Pointers Without a Split Reference Count? It Can Be Done!
(MSVC) • Explicit mutex is (thankfully) not used by either implementation • Both use the lowest-order bits on the control_block pointer as a lock26 Daniel Anderson -- danielanderson.net Solution #2:0 码力 | 45 页 | 5.12 MB | 5 月前3
共 10 条
- 1