Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Another technical article suggestion
Mon, Jun 17 2013 6:57 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I've just been modifying my DBGrid descendent and I had to choose how to test if the dataset was empty. I used (DataLink.Eof and DataLink.Bof) since I seem to recall asking the question years ago and was told it was a bit faster than (DataLink.RecordCount = 0). I could be wrong though.

That made me think I'm pretty sure we all know about having the right indices for SQL but are there tips for using ElevateDB for best performance. Much of the time it won't matter but when its in a heavy loop or something like this where its every time a cell is drawn in a DBGrid it would be good to be doing it the fastest way.

Roy Lambert
Tue, Jun 18 2013 1:29 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I've just been modifying my DBGrid descendent and I had to choose how to
test if the dataset was empty. I used (DataLink.Eof and DataLink.Bof) since
I seem to recall asking the question years ago and was told it was a bit
faster than (DataLink.RecordCount = 0). I could be wrong though.

That made me think I'm pretty sure we all know about having the right
indices for SQL but are there tips for using ElevateDB for best performance.
Much of the time it won't matter but when its in a heavy loop or something
like this where its every time a cell is drawn in a DBGrid it would be good
to be doing it the fastest way. >>

Just for reference, RecordCount is fine and is only a static Integer read.

Tim Young
Elevate Software
www.elevatesoft.com


Thu, Jun 20 2013 1:37 AMPermanent Link

Barry

Tim/Roy,

How about an article and demo program demonstrating how to implement Remote Trace to log the database activity? Log the time it takes to load the grid. Compare a join versus a subselect for 5 grid columns versus a computed column that does the lookup. You can then plot the times for a varying number of table rows and lookup columns so the developer knows which method is more efficient under certain conditions.

Barry
Image