DB2 SELECT COUNT(*)问题 [英] DB2 SELECT COUNT(*) problem

查看:683
本文介绍了DB2 SELECT COUNT(*)问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有人在大桌子上遇到这个问题。返回结果似乎需要很长时间(半小时:-()。


SELECT COUNT(*)来自COORDINATE


A奇怪的是,在查询过程中,临时空间(系统管理)不断增长:


14346747904 12月2日16:22 SQL00002.TDA


它几乎和当前的桌子一样大(17GB)。有什么意见吗?


非常感谢,


Bing

Hi,

Has anyone got problem with this on large table. It seems it take ages to return the result ( half an hour :-( ).

SELECT COUNT(*) FROM COORDINATE

A strange thing is the tempory space (System Managed) keeps growing during the query:

14346747904 Dec 2 16:22 SQL00002.TDA

It''s almost as large as the current table (17GB). Any comments?

Many thanks,

Bing

推荐答案

Bing Wu写道:
Bing Wu wrote:

你好,

有没有人有问题这个在大桌子上。似乎需要很长时间才能返回结果(半小时:-()。

SELECT COUNT(*)来自COORDINATE

一件奇怪的事情在查询期间,临时空间(系统管理)不断增长:

14346747904 12月2日16:22 SQL00002.TDA

它几乎与当前表一样大(17GB)。有什么意见吗?

非常感谢,

Bing

Hi,

Has anyone got problem with this on large table. It seems it take ages to return the result ( half an hour :-( ).

SELECT COUNT(*) FROM COORDINATE

A strange thing is the tempory space (System Managed) keeps growing during the query:

14346747904 Dec 2 16:22 SQL00002.TDA

It''s almost as large as the current table (17GB). Any comments?

Many thanks,

Bing




尝试:


从...中选择计数(1)


并查看。


hth。

Wolfgang



try:

select count(1) from ...

and see.

hth.
Wolfgang


非常感谢提示。好像还需要很长时间。


Bing

Wolfgang Riedel写道:
Many thanks for the hint. It seems still taking long time.

Bing
Wolfgang Riedel wrote:

试试:

从...中选择计数(1)。

hth。
Wolfgang

try:

select count(1) from ...

and see.

hth.
Wolfgang



>有没有人在大表上遇到此问题。似乎需要很长时间才能
>Has anyone got problem with this on large table. It seems it take ages to
返回结果(半小时:-()。

SELECT COUNT(*)FROM COORDINATE
return the result ( half an hour :-( ).

SELECT COUNT(*) FROM COORDINATE




你有解释吗?也许一个指数会有帮助



have you ran explain ? maybe an index would help


这篇关于DB2 SELECT COUNT(*)问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆