November 26, 2014 at 8:15 am
hello Guys,
I have a table that has about 64 million registered. When I did a select on the table I have a running time of 3:27 min. I want to know is that there is no way to optimize my request to reduce time..
thank you in advance.
November 26, 2014 at 8:22 am
if you
select * from MillionBillionRowTable
That takes a lot of time.
period.
you are returning a ton of data, and that requires resources.
the only way to speed that up is with hardware.(RAM, SSD's, Gigabit+ NIC.etc)
you can help a little, by only selecting real data you need, to reduce the amount of data(but not the # of rows) like this:
SELECT id,email from MillionBillionRowTable
as a DBA, you can tune things with WHERE statements:
select * from MillionBillionRowTable WHERE email = 'lowell@somedomain.com'
that statement might be really slow, as it would be a table scan unless the column was already indexed.
if i added an index on the email column, it would probably be faster...much faster and use anindex seek.
'
Lowell
November 26, 2014 at 10:32 am
Read the execution plan to understand how the query optimizer chose to interpret your query.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply