This is a migrated thread and some comments may be shown as answers.

Slow performance when using different networks

0 Answers 34 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lorena
Top achievements
Rank 1
Lorena asked on 29 May 2016, 09:18 AM

Hi all,

I am having very slow performance with Telerik Data Access when the database is not in the same network that the client application, but when I do not use Telerik the query returns the records very quickly.

The client application is a simple console application and the database is SQL Server 2014.

SISTEMA_LOG is a table with an autoincremented primary key with 16700 records, and the following instruction takes 35 seconds. 

contexto.SISTEMA_LOGs.ToList()

I have tried a lot of things. For instance, using take(5) before to "warm up", using low level ADO instead

contexto.ExecuteQuery(Of SISTEMA_LOG)("Select * from sistema_log"))

but the time of the query was the same, about 35 seconds in both cases.

But when I use the following snippet, the time is only 2 seconds...
 

Dim command As New SqlCommand("Select * from sistema_log", connection)
connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader()
Try
    Dim dt As New DataTable
    dt.Load(reader)
Finally
    reader.Close()
End Try

I have tried a lot of things to improve the time but always with the same result... 

I really appreciate any help you can provide.
Thanks in advance.

Lorena

Tags
Data Access Free Edition
Asked by
Lorena
Top achievements
Rank 1
Share this question
or