简体   繁体   English

Postgresql与Oracle中的dbms_stats.gather_table_stats等效什么?

[英]what is equivalent of Postgresql to dbms_stats.gather_table_stats in Oracle?

I have some question about Postgres, I have used dbms_stats.gather_table_stats for performance optimization in Oracle. 我对Postgres有一些疑问,我已经使用dbms_stats.gather_table_stats在Oracle中进行性能优化。 I would like to switch our database from Oracle to Postgres, therefore, I want to achieve same feature on Postgres also. 我想将我们的数据库从Oracle切换到Postgres,因此,我也想在Postgres上实现相同的功能。 I searched internet whether there is some equivalent feature existing in Postgres with dbms_stats.gather_table_stats in Oracle. 我在Internet上搜索了Postgres中是否存在与Oracle中的dbms_stats.gather_table_stats等效的功能。 The only I found was EXPLAIN, VACUUM something like that. 我发现的唯一是EXPLAIN,VACUUM之类的东西。 I think these are already existing in Oracle with same name. 我认为这些名称已经存在于Oracle中。 but I can't find proper ones for dbms_stats.gather_table_stats. 但是我找不到适合dbms_stats.gather_table_stats的数据库。 I am spedning a lot time on it, if you guys have some advice, could I get some? 我为此花了很多时间,如果你们有一些建议,我能得到一些建议吗?

The GATHER_TABLE_STATS procedure of DBMS_STATS package collects statistics of the specified table in Oracle. DBMS_STATS程序包的GATHER_TABLE_STATS过程收集Oracle中指定表的统计信息。

In Postgres, we use ANALYZE for the same purpose. 在Postgres中,出于相同目的,我们使用ANALYZE。

ANALYZE collects statistics about the contents of tables in the database, and stores the results in the pg_statistic system catalog. ANALYZE收集有关数据库中表内容的统计信息,并将结果存储在pg_statistic系统目录中。 Subsequently, the query planner uses these statistics to help determine the most efficient execution plans for queries. 随后,查询计划者使用这些统计信息来帮助确定最有效的查询执行计划。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 DBMS_STATS.GATHER_TABLE_STATS如何在Oracle中工作 - How DBMS_STATS.GATHER_TABLE_STATS works in oracle 有关dbms_stats.gather_table_stats的问题 - Question regarding dbms_stats.gather_table_stats 在Oracle过程中交换分区后的Dbms_Stats.Gather_Table_Stats吗? - Dbms_Stats.Gather_Table_Stats after partition exchange in Oracle procedure? Oracle 19C dbms_stats.gather_table_stats 缓慢并返回无效标识符错误 - Oracle 19C dbms_stats.gather_table_stats Slowness and return invalid identifier error LAST_ANALYZE null 在 dbms_stats.gather_table_stats 之后 - LAST_ANALYZE null after dbms_stats.gather_table_stats 为什么在 SSB 模式中的表上运行 dbms_stats.gather_table_stats 时会出现 ORA-20000? - Why do I get ORA-20000 when I run dbms_stats.gather_table_stats on a table in SSB Schema? 如何解决存储过程在通过 EXECUTE IMMEDIATE 作为字符串执行时不执行 dbms_stats.gather_table_stats() 的问题 - How to resolve issue of stored proc not executing dbms_stats.gather_table_stats() when executing as it string via EXECUTE IMMEDIATE 使用dbms_stats.gather_schema_stats [oracle] - Using dbms_stats.gather_schema_stats [oracle] Oracle PLSQL,在 DBMS_STATS.GATHER_SCHEMA_STATS 中选择 - Oracle PLSQL, select in DBMS_STATS.GATHER_SCHEMA_STATS 在Oracle 11G中,什么是最佳选择? 删除重新创建索引或仅删除dbms_stats.gather - What is more optimal in Oracle 11G? Drop Recreate Indexes or just dbms_stats.gather
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM