先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7

深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新软件测试全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上软件测试知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

如果你需要这些资料,可以添加V获取:vip1024b (备注软件测试)
img

正文

postgres=# select pg_size_pretty(pg_database_size(‘postgres’));
pg_size_pretty

6229 kB
(1 行记录)

查看david 数据库大小

david=# select pg_database_size(‘david’);
pg_database_size

190534776
(1 row)

查看所有数据库大小

david=# select pg_database.datname, pg_database_size(pg_database.datname) AS size from pg_database;
datname | size
-----------±------------
template0 | 6513156
postgres | 6657144
jboss | 6521348
bugs | 6521348
david | 190534776
BMCV3 | 28147135608
mydb | 10990712
template1 | 6521348
(8 rows)

查看所有数据库大小

david=# select pg_database.datname, pg_database_size(pg_database.datname) AS size from pg_database;

这样查出来的结果,看上去太长了,不太容易读数。

3.3 以人性化的方式显示大小

david=# select pg_size_pretty(pg_database_size(‘david’));
pg_size_pretty

MB
(1 row)

索引

创建索引

CREATE INDEX idx_key_eng_search_status
ON base.keyword_engine
USING btree
(search_status);

3.4 查看单索引大小

david=# select pg_relation_size(‘idx_test’);
pg_relation_size

(1 row)

david=# select pg_size_pretty(pg_relation_size(‘idx_test’));
pg_size_pretty

MB
(1 row)

david=# select pg_size_pretty(pg_relation_size(‘idx_join_date_test’));
pg_size_pretty

MB
(1 row)

3.5 查看指定表中所有索引大小

david=# select pg_indexes_size(‘test’);
pg_indexes_size

(1 row)

david=# select pg_size_pretty(pg_indexes_size(‘test’));
pg_size_pretty

MB
(1 row)

idx_test 和idx_join_date_test 两个索引大小加起来差不多等于上面pg_indexes_size() 查询出来的索引大小。

3.6 查看指定schema 里所有的索引大小,按从大到小的顺序排列。

david=# select * from pg_namespace;
nspname | nspowner | nspacl
--------------------±---------±------------------------------------
pg_toast | 10 |
pg_temp_1 | 10 |
pg_toast_temp_1 | 10 |
pg_catalog | 10 | {postgres=UC/postgres,=U/postgres}
information_schema | 10 | {postgres=UC/postgres,=U/postgres}
public | 10 | {postgres=UC/postgres,=UC/postgres}
(6 rows)

david=# select indexrelname, pg_size_pretty(pg_relation_size(relid)) from pg_stat_user_indexes where schemaname=‘public’ order by pg_relation_size(relid) desc;
indexrelname | pg_size_pretty
-------------------------------±---------------
idx_join_date_test | 91 MB
idx_test | 91 MB
testtable_idx | 1424 kB
city_pkey | 256 kB
city11 | 256 kB
countrylanguage_pkey | 56 kB
sale_pkey | 8192 bytes
track_pkey | 8192 bytes
tbl_partition_201211_joindate | 8192 bytes
tbl_partition_201212_joindate | 8192 bytes
tbl_partition_201301_joindate | 8192 bytes
tbl_partition_201302_joindate | 8192 bytes
tbl_partition_201303_joindate | 8192 bytes
customer_pkey | 8192 bytes
album_pkey | 8192 bytes
item_pkey | 8192 bytes
tbl_partition_201304_joindate | 8192 bytes
tbl_partition_201307_joindate | 8192 bytes
tbl_partition_201305_joindate | 0 bytes
tbl_partition_201306_joindate | 0 bytes
(20 rows)

查看索引大小

select indexrelname, pg_size_pretty(pg_relation_size(relid)) from pg_stat_user_indexes where schemaname=‘public’ order by pg_relation_size(relid) desc;

3.7 查看指定表大小

david=# select pg_relation_size(‘test’);
pg_relation_size

(1 row)

david=# select pg_size_pretty(pg_relation_size(‘test’));
pg_size_pretty

MB
(1 row)

使用pg_table_size() 函数查看

david=# select pg_table_size(‘test’);
pg_table_size

(1 row)

david=# select pg_size_pretty(pg_table_size(‘test’));
pg_size_pretty

MB
(1 row)

3.8 查看指定表的总大小

david=# select pg_total_relation_size(‘test’);
pg_total_relation_size

(1 row)

david=# select pg_size_pretty(pg_total_relation_size(‘test’));
pg_size_pretty

MB
(1 row)

3.9 查看指定schema 里所有的表大小,按从大到小的顺序排列。

david=# select * from pg_namespace;
nspname | nspowner | nspacl
--------------------±---------±------------------------------------
pg_toast | 10 |
pg_temp_1 | 10 |
pg_toast_temp_1 | 10 |
pg_catalog | 10 | {postgres=UC/postgres,=U/postgres}
information_schema | 10 | {postgres=UC/postgres,=U/postgres}
public | 10 | {postgres=UC/postgres,=UC/postgres}
(6 rows)

david=# select indexrelname, pg_size_pretty(pg_relation_size(relid)) from pg_stat_user_indexes where schemaname=‘public’ order by pg_relation_size(relid) desc;
indexrelname | pg_size_pretty
-------------------------------±---------------
idx_join_date_test | 91 MB
idx_test | 91 MB
testtable_idx | 1424 kB
city_pkey | 256 kB
city11 | 256 kB
countrylanguage_pkey | 56 kB
sale_pkey | 8192 bytes
track_pkey | 8192 bytes
tbl_partition_201211_joindate | 8192 bytes
tbl_partition_201212_joindate | 8192 bytes
tbl_partition_201301_joindate | 8192 bytes
tbl_partition_201302_joindate | 8192 bytes
tbl_partition_201303_joindate | 8192 bytes
customer_pkey | 8192 bytes
album_pkey | 8192 bytes
item_pkey | 8192 bytes
tbl_partition_201304_joindate | 8192 bytes
tbl_partition_201307_joindate | 8192 bytes
tbl_partition_201305_joindate | 0 bytes
tbl_partition_201306_joindate | 0 bytes
(20 rows)

3.7 查看指定表大小

david=# select pg_relation_size(‘test’);
pg_relation_size

(1 row)

david=# select pg_size_pretty(pg_relation_size(‘test’));
pg_size_pretty

MB
(1 row)

使用pg_table_size() 函数查看

david=# select pg_table_size(‘test’);
pg_table_size

(1 row)

david=# select pg_size_pretty(pg_table_size(‘test’));
pg_size_pretty

MB
(1 row)

3.8 查看指定表的总大小

david=# select pg_total_relation_size(‘test’);
pg_total_relation_size

(1 row)

david=# select pg_size_pretty(pg_total_relation_size(‘test’));
pg_size_pretty

MB
(1 row)

3.9 查看指定schema 里所有的表大小,按从大到小的顺序排列。

david=# select relname, pg_size_pretty(pg_relation_size(relid)) from pg_stat_user_tables where schemaname=‘public’ order by pg_relation_size(relid) desc;
relname | pg_size_pretty
-------------------------------±---------------
test | 91 MB
testtable | 1424 kB
city | 256 kB

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
img

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
t | 91 MB
testtable | 1424 kB
city | 256 kB

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
[外链图片转存中…(img-2vEQjg18-1713343067686)]

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐