By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,340 Members | 1,715 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,340 IT Pros & Developers. It's quick & easy.

Query returning 1.7million records slow

P: n/a
Hi,

I have a sql server database with 1.7 million records in a table, with
about 30 fields

When I run select * from tablename it can take over 5 minutes.

How can I get this time down or is it normal?

Thanks
Jerry

Nov 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
>I have a sql server database with 1.7 million records in a table, with
about 30 fields

When I run select * from tablename it can take over 5 minutes.

How can I get this time down or is it normal?


Perfectly normal.

What exactly are you trying to do? If you just want to export every
row in the table to a csv file or something, use BCP or DTS. If you
only want certain rows (or fields) then I would adjust the query
accordingly.

Nov 23 '05 #2

P: n/a
On 17 Nov 2005 06:21:22 -0800, Je***************@gmail.com wrote:
Hi,

I have a sql server database with 1.7 million records in a table, with
about 30 fields

When I run select * from tablename it can take over 5 minutes.

How can I get this time down or is it normal?


Hi Jerry,

1.7 million rows of 30 columns each is a lot of data. The performance
might well be limited by the network capacity or by the processing that
the client does on the data.

Does the client really need all these rows? Try to refine your query -
send only those columns and those rows across the network that the
client actually needs. Pre-aggregate at the server if the client will
only use aggregates.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)
Nov 23 '05 #3

P: n/a


Je***************@gmail.com wrote:
Hi,

I have a sql server database with 1.7 million records in a table, with
about 30 fields

When I run select * from tablename it can take over 5 minutes.

How can I get this time down or is it normal?

Thanks
Jerry


It sounds fast actually. This isn't something you should be doing
very often anyway. What are you doing with all that data out of
the DBMS?
Joe Weinstein at BEA Systems

Nov 23 '05 #4

P: n/a
(Je***************@gmail.com) writes:
I have a sql server database with 1.7 million records in a table, with
about 30 fields

When I run select * from tablename it can take over 5 minutes.

How can I get this time down or is it normal?


Running a SELECT that returns 1.7 milions rows is not normal...
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.