暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 14 preview - brin 索引内存优化

digoal 2021-01-03
331

作者

digoal

日期

2021-03-24

标签

PostgreSQL , brin , 优化


背景

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8e4b332e88b8339408a3aa8c62bc93d96b67c808

```
Optimize allocations in bringetbitmap
author Tomas Vondra tomas.vondra@postgresql.org
Mon, 22 Mar 2021 23:47:06 +0000 (00:47 +0100)
committer Tomas Vondra tomas.vondra@postgresql.org
Mon, 22 Mar 2021 23:47:09 +0000 (00:47 +0100)
commit 8e4b332e88b8339408a3aa8c62bc93d96b67c808
tree 846b32ea51c4f91aa87e9d5f240e2d09cd455d3e tree
parent 72ccf55cb99c6450dfb77f2f8f4a28b5c049ef7a commit | diff
Optimize allocations in bringetbitmap

The bringetbitmap function allocates memory for various purposes, which
may be quite expensive, depending on the number of scan keys. Instead of
allocating them separately, allocate one bit chunk of memory an carve it
into smaller pieces as needed - all the pieces have the same lifespan,
and it saves quite a bit of CPU and memory overhead.

Author: Tomas Vondra tomas.vondra@postgresql.org
Reviewed-by: Alvaro Herrera alvherre@alvh.no-ip.org
Reviewed-by: Mark Dilger hornschnorter@gmail.com
Reviewed-by: Alexander Korotkov aekorotkov@gmail.com
Reviewed-by: Masahiko Sawada masahiko.sawada@enterprisedb.com
Reviewed-by: John Naylor john.naylor@enterprisedb.com
Discussion: https://postgr.es/m/c1138ead-7668-f0e1-0638-c3be3237e812@2ndquadrant.com
```

PostgreSQL 许愿链接

您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.

9.9元购买3个月阿里云RDS PostgreSQL实例

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

文章转载自digoal,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论