Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 如何在不使用count(*)的情况下在greenplum中查找表中的行数_Database_Greenplum - Fatal编程技术网

Database 如何在不使用count(*)的情况下在greenplum中查找表中的行数

Database 如何在不使用count(*)的情况下在greenplum中查找表中的行数,database,greenplum,Database,Greenplum,执行“我要从任何系统表中获取表中的行数”需要花费太多时间。您可以在下面的查询中尝试获取大致的行数 Select count(*) from table; 谢谢,但我需要精确的行数。除了pg_类,count(*)是获取表中行数的唯一选项。若需要更多时间,则进行真空操作,并在工作台上分析操作。还要检查表数据是否正确分布 select reltuples from pg_class WHERE relname = 'table1';

执行“我要从任何系统表中获取表中的行数”需要花费太多时间。

您可以在下面的查询中尝试获取大致的行数

Select count(*) from table;

谢谢,但我需要精确的行数。除了pg_类,count(*)是获取表中行数的唯一选项。若需要更多时间,则进行真空操作,并在工作台上分析操作。还要检查表数据是否正确分布
select reltuples from pg_class WHERE relname = 'table1';