共 10 篇文章 |
|
SlimTrie的设计目标。SlimTrie的大小跟key的长度无关. 也就是说任意长度的key的集合都可以使用有限大小的SlimTrie来索引: SlimTrie最多有2n-1个节点: 最多节点是出现在所有inner节点都是二分的时候(空间复杂度为O(n))inners的每个元素是4 byte, 其中2 byte是一个bitmap来保存最多15个子节点的branch. 另外一个2 byte的uint16表示它第一个子节... 阅88 转0 评0 公众公开 19-04-06 17:03 |
数据库索引原理及优化。了解不同存储引擎的索引实现方式对于正确使用和优化索引都非常有帮助,例如知道了InnoDB的索引实现后,就很容易明白为什么不建议使用过长的字段作为主键,因为所有辅助索引都引用主索引,过长的主索引会令辅助索引变得过大。前缀索引。前缀索引就是用列的前缀代替整个列作为索引key,当前缀长度合适时,可以做到既使得前... 阅27 转1 评0 公众公开 19-04-06 17:03 |
sudo apt-get --purge remove mysql-server mysql-common mysql-clientsudo apt-get install mysql-server mysql-common mysql-clientmysqladmin -u root password your-new-passwordsudo /etc/init.+------------------+-----------+| User | Host |+------------------+-----------+| admin | localhost || debian-sys-maint | localhost || ... 阅119 转0 评0 公众公开 18-08-17 11:24 |
MySQL数据库开发的 36 条军规!来自:www.slideshare.net/mysqlops/mysql-9838563用好数值字段,尽量简化字段位数.避免使用Null字段。索引类军规。谨慎合理添加索引。字符字段必须建立前缀索引?不在索引列做运算。Count不要使用在可Null的字段上面。Limit高效分页,SELECT * FROM message WHERE id > 9527 (or sub select) limit 10.使用Uni... 阅54 转0 评0 公众公开 18-06-26 08:32 |
Install Osmosis.Like osm2pgsql in the previous chapter, we will need to download and set up osmosis so thatwe can run it from the command line.an input file (sample_osmosis.osm.pbf) some rules which define what we want to filter an output file (we will output an uncompressed .osm file so we can openit in JOSM)osmosis ... 阅69 转0 评0 公众公开 16-09-08 22:07 |
解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server问题,有碰到此问题的同学可进入参考。这段时间在研究火车头的入库教程,在“配置登陆信息和数据库(mysql)”连接中,出现“服务器连接错误Host ''XXX'' i... 阅5228 转13 评0 公众公开 16-09-05 15:16 |
} } public static Connection getConn(){ if(conn !public class BaseDao { /** * 创建连接池 * */ public Connection getConn(){ Connection conn = null; try { Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("java:comp/env/news"); conn = ds.getConnection(); } catch (NamingException e) { e... 阅84 转1 评0 公众公开 16-08-26 00:25 |