0

I'm using Delphi 7 and SQL Server 2008. The connection is AdoConnection and the Query component I'm using is TAdoQuery.

When i run the following simple query in sql server

select FMStreamid, Latitude, Longitude, RealTime from tblFMStream where vehicleid = 2 

it takes 2 sec to execute in sql server (see pic) sql server response

However running the same query in Delphi takes around 15 seconds to Open. Does anyone know how to speed that? Thanks

ppetkov
  • 47
  • 5
  • You can't compare execution time from a database layer to the execution time in a program – Alec May 04 '17 at 07:54
  • I'm comparing them to show that the problem is not in the query itself, as would most of the answers suggest. – ppetkov May 04 '17 at 11:57
  • Well after checking all the Delphi code you provided I must say I cannot see any problems there... – GuidoG May 04 '17 at 15:51

1 Answers1

0

They extra time from Delphi is probably a combination of the provider that AdoConnection is using and dataset events being fired when you open your query

Paul McCarthy
  • 818
  • 9
  • 24