简体   繁体   English

如何在 Progress OpenEdge 数据库中查询表大小、最大大小和行数

[英]How to query table size, max size and row count in Progress OpenEdge Database

I am connected to an OpenEdge Database using JDBC and I want to query information like table size, max size, and row count.我使用 JDBC 连接到 OpenEdge 数据库,我想查询表大小、最大大小和行数等信息。 Any help would be highly appreciated.任何帮助将不胜感激。

The only way to query this sort of thing at runtime is to read the table and calculate what you need.在运行时查询此类事情的唯一方法是读取表并计算您需要的内容。 It's not going to be that pleasant.它不会那么愉快。

The best way to provide this sort of information though is to use a DB Analysis.不过,提供此类信息的最佳方法是使用 DB 分析。 From a proenv session on the database server:从数据库服务器上的 proenv 会话:

proutil [dbname] -C dbanalys > mydb.dbana proutil [dbname] -C dbanalys > mydb.dbana

The output of this contains all the info that you need.此输出包含您需要的所有信息。 You should be careful of running this during busy times as it will have a performance impact.您应该小心在繁忙时间运行它,因为它会影响性能。

Documentation on the command is available here: https://documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dmadm%2Fproutil-dbanalys-qualifier.html%23wwID0EFCKY该命令的文档可在此处获得: https : //documentation.progress.com/output/ua/OpenEdge_latest/index.html#page/dmadm%2Fproutil-dbanalys-qualifier.html%23wwID0EFCKY

This also includes details on the -csoutput option that produces the files in a nicely segregated text file format which may make parsing the info you want easier.这还包括有关 -csoutput 选项的详细信息,该选项以很好地隔离的文本文件格式生成文件,这可能会使解析您想要的信息更容易。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM