-
DB2 SELECT COUNT(*) problem
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
-
Re: DB2 SELECT COUNT(*) problem
Bing Wu wrote:
>
> 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
try:
select count(1) from ...
and see.
hth.
Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Bing Wu wrote:
>
> 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
try:
select count(1) from ...
and see.
hth.
Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Bing Wu wrote:
>
> 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
try:
select count(1) from ...
and see.
hth.
Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Bing Wu wrote:
>
> 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
try:
select count(1) from ...
and see.
hth.
Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Many thanks for the hint. It seems still taking long time.
Bing
Wolfgang Riedel wrote:
>
> try:
>
> select count(1) from ...
>
> and see.
>
> hth.
> Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Many thanks for the hint. It seems still taking long time.
Bing
Wolfgang Riedel wrote:
>
> try:
>
> select count(1) from ...
>
> and see.
>
> hth.
> Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Many thanks for the hint. It seems still taking long time.
Bing
Wolfgang Riedel wrote:
>
> try:
>
> select count(1) from ...
>
> and see.
>
> hth.
> Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
Many thanks for the hint. It seems still taking long time.
Bing
Wolfgang Riedel wrote:
>
> try:
>
> select count(1) from ...
>
> and see.
>
> hth.
> Wolfgang
-
Re: DB2 SELECT COUNT(*) problem
>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
>
have you ran explain ? maybe an index would help