Home > Archive > Microsoft SQL Server forum > November 2005 > Query returning 1.7million records slow









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Query returning 1.7million records slow
JeremiahOSullivan@gmail.com

2005-11-17, 9:23 am

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

ZeldorBlat

2005-11-17, 11:23 am

>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.

Joe Weinstein

2005-11-17, 8:24 pm



JeremiahOSullivan@gm
ail.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

Erland Sommarskog

2005-11-20, 8:23 pm

(JeremiahOSullivan@g
mail.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, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com