在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

PostgreSQL zedstore在CentOS 7.4进行大批量数据的测试分析

107次阅读
没有评论

共计 4547 个字符,预计需要花费 12 分钟才能阅读完成。

这篇文章主要介绍“PostgreSQL zedstore 在 CentOS 7.4 进行大批量数据的测试分析”,在日常操作中,相信很多人在 PostgreSQL zedstore 在 CentOS 7.4 进行大批量数据的测试分析问题上存在疑惑,丸趣 TV 小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”PostgreSQL zedstore 在 CentOS 7.4 进行大批量数据的测试分析”的疑惑有所帮助!接下来,请跟着丸趣 TV 小编一起来学习吧!

zedstore 在执行 avg 时直接 coredump.

testdb=# create table t_ap_heap (id1 int,id2 int,id3 int,id4 int,id5 int ,id6 int,id7 int,id8 int,id9 int);
CREATE TABLE
testdb=# 
testdb=# insert into t_ap_heap 
testdb-# select x,x,x,x,x,x,x,x,x
testdb-# from generate_series(1,10000000) as x;
INSERT 0 10000000
testdb=# 
testdb=# drop table if exists t_ap_zedstore;
DROP TABLE
testdb=# create table t_ap_zedstore 
testdb-# (id1 int,id2 int,id3 int,id4 int,id5 int ,id6 int,id7 int,id8 int,id9 int) using zedstore;
CREATE TABLE
testdb=# 
testdb=# insert into t_ap_zedstore 
testdb-# select x,x,x,x,x,x,x,x,x
testdb-# from generate_series(1,10000000) as x;
INSERT 0 10000000
testdb=# 
testdb=# select pg_size_pretty(pg_table_size( t_ap_heap 
 pg_size_pretty 
----------------
 651 MB
(1 row)
testdb=# select pg_size_pretty(pg_table_size( t_ap_zedstore 
 pg_size_pretty 
----------------
 501 MB
(1 row)
testdb=# explain analyze select avg(id1) from t_ap_heap;
 QUERY PLAN 
-----------------------------------------------------------------------------------------------------------------------------
---------------------
 Finalize Aggregate (cost=136417.97..136417.98 rows=1 width=32) (actual time=2432.238..2432.240 rows=1 loops=1)
 -  Gather (cost=136417.75..136417.96 rows=2 width=32) (actual time=2432.015..2433.781 rows=3 loops=1)
 Workers Planned: 2
 Workers Launched: 2
 -  Partial Aggregate (cost=135417.75..135417.76 rows=1 width=32) (actual time=2363.185..2363.185 rows=1 loops=3)
 -  Parallel Seq Scan on t_ap_heap (cost=0.00..125001.00 rows=4166700 width=4) (actual time=0.348..1843.592 r
ows=3333333 loops=3)
 Planning Time: 28.360 ms
 Execution Time: 2434.173 ms
(8 rows)
testdb=# explain analyze select avg(id1) from t_ap_zedstore;
psql: WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and repeat your command.
psql: server closed the connection unexpectedly
 This probably means the server terminated abnormally
 before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!

重新连接, 执行查询:

testdb=# explain analyze select avg(id1) from t_ap_heap;
 QUERY PLAN 
-----------------------------------------------------------------------------------------------------------------------------
--------------------
 Finalize Aggregate (cost=136417.97..136417.98 rows=1 width=32) (actual time=1357.266..1357.267 rows=1 loops=1)
 -  Gather (cost=136417.75..136417.96 rows=2 width=32) (actual time=1357.068..1362.153 rows=3 loops=1)
 Workers Planned: 2
 Workers Launched: 2
 -  Partial Aggregate (cost=135417.75..135417.76 rows=1 width=32) (actual time=1346.515..1346.515 rows=1 loops=3)
 -  Parallel Seq Scan on t_ap_heap (cost=0.00..125001.00 rows=4166700 width=4) (actual time=0.488..830.427 ro
ws=3333333 loops=3)
 Planning Time: 0.550 ms
 Execution Time: 1362.347 ms
(8 rows)
testdb=# explain analyze select avg(id1) from t_ap_zedstore;
 QUERY PLAN 
-----------------------------------------------------------------------------------------------------------------------------
---------------
 Finalize Aggregate (cost=107843.55..107843.56 rows=1 width=32) (actual time=9.579..9.580 rows=1 loops=1)
 -  Gather (cost=107843.33..107843.54 rows=2 width=32) (actual time=0.467..11.620 rows=3 loops=1)
 Workers Planned: 2
 Workers Launched: 2
 -  Partial Aggregate (cost=106843.33..106843.34 rows=1 width=32) (actual time=0.020..0.021 rows=1 loops=3)
 -  Parallel Seq Scan on t_ap_zedstore (cost=0.00..98295.87 rows=3418987 width=4) (actual time=0.007..0.008 r
ows=0 loops=3)
 Planning Time: 0.268 ms
 Execution Time: 11.835 ms
(8 rows)
testdb=#

heap vs zedstore : 1362ms vs 12ms, 性能确实有大幅提升.

不过, 等等

testdb=# select avg(id1) from t_ap_heap;
 avg 
----------------------
 5000000.500000000000
(1 row)
testdb=# select avg(id1) from t_ap_zedstore;
 avg 
-----
(1 row)
testdb=# select count(*) from t_ap_zedstore;
 count 
-------
 0
(1 row)
testdb=# insert into t_ap_zedstore 
testdb-# select x,x,x,x,x,x,x,x,x
testdb-# from generate_series(1,10000000) as x;
psql: ERROR: too many attributes for zedstore
testdb=#

到此,关于“PostgreSQL zedstore 在 CentOS 7.4 进行大批量数据的测试分析”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注丸趣 TV 网站,丸趣 TV 小编会继续努力为大家带来更多实用的文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-24发表,共计4547字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 国产成人女人视频在线观看 | 在线免费观看欧美 | 国产精品久久久亚洲456 | 国产精品成人免费视频 | 一级片黄色免费 | 亚洲人成影院在线高清 | 蜜桃视频一区二区三区四区 | 亚洲日韩国产成网在线观看 | 亚洲中国最大av网站 | 国内女人喷潮完整视频 | 99热精品国产三级在线 | 在线视频毛片 | 亚洲av日韩av天堂影片精品 | 玩弄丰满少妇xxxxx性多毛 | 欧洲成人全免费视频网站 | 亚洲男同gay在线观看 | 国产精品久久人妻无码hd毛片 | 欧美性猛交xxxx乱大交3 | 色欲麻豆国产福利精品 | 中文字幕欧美亚洲 | 久久久国产免费影院 | 亚洲有码转帖 | 久久这里只有精品8 | 亚洲伊人一本大道中文字幕 | 91免费视频网站 | 国内精品久久久久久影院网站小说 | 成人毛片免费观看视频在线 | 色久影院| 在线观看国产一区 | 国产麻豆剧传媒精品国产免费 | 熟女无套高潮内谢吼叫免费 | 国产aa视频 | 欧美在线一区视频 | 青柠影视在线观看日本 | 美女脱裤子让男人桶 | 妞干网免费视频观看 | 中文字幕无码日韩专区免费 | 男人添女人下部高潮全视频 | 一级黄色片免费看 | 亚洲精品乱码久久久久久蜜桃不卡 | 免费看黄色大片 |