Re: 100% CPU usage to do nothing.



Using Delphi6 and ADOData Set and connection componetes.
In this application I am selecting a large amount of data from a Microsoft
SQL2005 and noted it running slow the CPU was at 100% and the process was
slowing with time. So I commented all out as to have this
TblSql.First
while not TblSql.Eof do
begin
TblSql.next;
end;
and it takes the same length of time with 100% usage. Any Ideas on what is
wrong and how to fix.

In addition to the other answers, if this is a client-side dataset, the
TblSql
component is caching all rows on the client.

Is this a TADOTable component? If so, don't use those, use a query instead.

How many rows are involved?

--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


.