问答 2024-06-08 来自:开发者社区

云原生数据仓库AnalyticDB PostgreSQL版使用count(distinct c...

云原生数据仓库AnalyticDB PostgreSQL版使用count(distinct column_a)语法特别耗CPU有其他方式代替吗

问答 2022-04-15 来自:开发者社区

postgresql standby server执行部分sql不响应,如count整个表

我使用hot_standby做的备库,给线上主库做负载(pgpool)。但是发现,备库在执行某些sql的时候一直的时候,响应时间很长,甚至几个小时没结果返回也不中断,,sy_bs_package這张表目前数据量在1000w+级别,数据更新很频繁,按照我的理解应该是出现了“查询冲突”,我通过pg_last_xlog_replay_location(),pg_last_xlog_receive_lo....

文章 2022-02-17 来自:开发者社区

PostgreSQL sharding : citus 系列7 - topn 加速(count(*) group by order by count(*) desc limit x) (use 估值插件 topn)

标签 PostgreSQL , topn , topn.number_of_counters , count(*) group by order by count(*) desc limit x 背景 count(*) group by order by count(*) desc limit x 用来统计 topn。 topn是运营的重要指标,比如排行前10的活跃用户。 如果...

PostgreSQL sharding : citus 系列7 - topn 加速(count(*) group by order by count(*) desc limit x) (use 估值插件 topn)
文章 2022-02-17 来自:开发者社区

PostgreSQL sharding : citus 系列6 - count(distinct xx) 加速 (use 估值插件 hll|hyperloglog)

标签 PostgreSQL , hll , hyperloglog , distinct , 加速 , citus.count_distinct_error_rate 背景 在分布式数据库中,计算count(distinct xxx),需要对distinct 的字段, 1、去重, 2、重分布去重后的数据,(这一步,如果distinct值特别多,那么就会比较耗时) 3、然后再去重, 4、最后c...

文章 2022-02-16 来自:开发者社区

PostgreSQL 流式统计 - insert on conflict 实现 流式 UV(distinct), min, max, avg, sum, count ...

标签 PostgreSQL , 流式统计 , insert on conflict , count , avg , min , max , sum 背景 流式统计count, avg, min, max, sum等是一个比较有意思的场景,可用于实时大屏,实时绘制统计图表。 比如菜鸟、淘宝、阿里游戏、以及其他业务系统的FEED日志,按各个维度实时统计输出结果。(实时FEED统计,实时各...

PostgreSQL 流式统计 - insert on conflict 实现 流式 UV(distinct), min, max, avg, sum, count ...
问答 2022-02-15 来自:开发者社区

PostgreSQL的给timestamp建立索引后,count变慢的问题。

测试数据2000万,当我使用如下的一个SQL时, select count(1) from t_member where birthday between '1997-09-14' and '2007-09-14'; 如果不创建索引,这个SQL将会在1s之后返回结果(2500817条记录),如果通过以下脚本 create index t_member_birthday_index ...

问答 2022-02-15 来自:开发者社区

PostgreSQL单纯的select执行,会不会产生WAL日志?我刚才执行了一个全表count 主备延迟好高

PostgreSQL单纯的select执行,会不会产生WAL日志?我刚才执行了一个全表count 主备延迟好高本问题来自云栖社区【PostgreSQL技术进阶社群】。https://yq.aliyun.com/articles/690084 点击链接欢迎加入社区大社群。

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

相关镜像