471,089 Members | 1,296 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,089 software developers and data experts.

Group By Query Casues TimeOut Error

I have a table with 6 million rows.
I'm trying to perform a group by query that incudes a row count of the
PK column:

SELECT COUNT(DataID) AS Cnt, Column1Name
FROM dbo.TableName
WHERE (Column2Name = N'p')
GROUP BY Column1Name

I have the query timeout set to 0 in Enterprise Manger. However, if I
run this query, either in Enterprise Manager or in Query Analyzer, I
get the following error message:

[Microsoft][ODBC SQL Server Driver]Timeout expired

A little baffled as to why and how to run this query.

Any help is appreciated.
lq

Oct 22 '06 #1
2 3034
Apologies for the multiple posts in this group. My connection kept
getting dropped and I didn't know the post had succeeded. lq

On Oct 22, 12:21 pm, "laurenquantrell" <laurenquantr...@hotmail.com>
wrote:
I have a table with 6 million rows.
I'm trying to perform a group by query that incudes a row count of the
PK column:

SELECT COUNT(DataID) AS Cnt, Column1Name
FROM dbo.TableName
WHERE (Column2Name = N'p')
GROUP BY Column1Name

I have the query timeout set to 0 in Enterprise Manger. However, if I
run this query, either in Enterprise Manager or in Query Analyzer, I
get the following error message:

[Microsoft][ODBC SQL Server Driver]Timeout expired

A little baffled as to why and how to run this query.

Any help is appreciated.
lq
Oct 22 '06 #2
Hi,

Are you running the query from the same box? If not, what kind of
connectivity do you have to the box?

Also, what kind of indexes are in place for the query?

SQL Version and Service pack info would also be good.

laurenquantrell wrote:
Apologies for the multiple posts in this group. My connection kept
getting dropped and I didn't know the post had succeeded. lq

On Oct 22, 12:21 pm, "laurenquantrell" <laurenquantr...@hotmail.com>
wrote:
I have a table with 6 million rows.
I'm trying to perform a group by query that incudes a row count of the
PK column:

SELECT COUNT(DataID) AS Cnt, Column1Name
FROM dbo.TableName
WHERE (Column2Name = N'p')
GROUP BY Column1Name

I have the query timeout set to 0 in Enterprise Manger. However, if I
run this query, either in Enterprise Manager or in Query Analyzer, I
get the following error message:

[Microsoft][ODBC SQL Server Driver]Timeout expired

A little baffled as to why and how to run this query.

Any help is appreciated.
lq
Oct 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dunc | last post: by
6 posts views Thread by Martin Eyles | last post: by
4 posts views Thread by mikado | last post: by
reply views Thread by laurenquantrell | last post: by
reply views Thread by laurenquantrell | last post: by
1 post views Thread by =?Utf-8?B?QW5kcmV3?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.