This is a discussion on Query returning 1.7million records slow within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, I have a sql server database with 1.7 million records in a table, with about 30 fields When ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| >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. |
| |||
| On 17 Nov 2005 06:21:22 -0800, JeremiahOSullivan@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) |
| |||
| JeremiahOSullivan@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 |
| ||||
| (JeremiahOSullivan@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, esquel@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 |