August 4, 2011 at 3:25 pm
Select * from table_name
I have a table which is heap and also no non-clustured indexes,
When I Run the above query its taking approx. 2mins, no.of rows in this table are 27500
Do Clustered or Non clustered helpful to speed up the query ?
I cannot change the query...thats the requirement.
Also tried select col1,col2,......from Table_name its taking the same time
What we should if have to use this type of queries?
Any Inputs are will be appreciated!
August 4, 2011 at 3:29 pm
Nope. You're asking for every column, every row. That's a table scan, there's no faster way to fetch the entire table.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 4, 2011 at 3:31 pm
August 4, 2011 at 3:34 pm
Nothing.
Putting an appropriate clustered index in place instead of a heap might save a second or 2, maybe.
Or you could request hardware upgrades. A faster network, more memory and better IO subsystem might help.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 4, 2011 at 3:38 pm
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply