W
W
WannaBePro2018-04-06 17:45:27
SQL
WannaBePro, 2018-04-06 17:45:27

Sql query, simple table, big data why long duration?

There is a table of actual weather service data with 2 columns: primary key datetime2 and varbinary
The usual "select from where date between" gives ~ 1 million rows per month and lasts ~ 10 seconds.
Given that the sample can be for a year, for the task at hand it takes a very long time.
How can the sampling time be reduced?
PS: nolock is worth it, rebuilding the indexes did not give any result

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-04-06
@WannaBePro

I would go the other way. Getting 1 million rows - this is clearly not the end result, what do you want to do with them? Can write such request which will give out at once the final result?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question