Can I improve my SQL response times?
I am executing a query that gets some data from a remote server.
It is a simple select query say
select * from opendatasource(----).[Database].[dbo].[Table1]
Now Table1 (has 4 columns) contains 15 hundred-thousand records and is growing in size.
On my server where I get the result set of the query it takes around 6 seconds to get the data. It looks slow to me.
The Table1 has 开发者_如何学Ca primary key field of datatype char(28) and no other index of any kind is defined.
This seems to be the problem.
What might be a possible workaround to make the database do work faster?
Help is appreciated
Thanks
You are pulling whole table. I don't think you can make it faster.
Unless:
- you filter the number of pulled rows (
where
condition) - add index covering you
where
condition - limit the number of returned field (
select field1, field2
vsselect *
) - get faster connection between the client (wherever you run the script) and server
精彩评论