SgDotNet
Singapore Professional .NET User Group -For Cool Developers

High CPU, low I/O, how to achieve it?

rated by 0 users
This post has 4 Replies | 1 Follower

Top 75 Contributor
Posts 34
tingshen Posted: 10-05-2007 4:26 PM

One of my colleagues mentioned about improving server performance through programming with as least I/O as possible by reducing the use of SQL statement. I'm wondering, how can a program achieve that ? Is there any alternative without using SQL statement to access SQL Servers like 2005 and the upcoming 2008?

I know Cobol on AS/400 has no problem, it can access the data directly without going through SQL statements, and DB2 is able to manage the flat file like a database.

 Any idea?

Top 25 Contributor
Posts 184

maybe he's referring to minimising database reads by putting everything inside RAM so that the app doesn't have to hit the disk during processing?

sounds kinda vague to me and i have no idea too how to achieve it without creating your own db server software Stick out tongue 

http://devpinoy.org/blogs/cruizer

Top 25 Contributor
Posts 157

My opinion is rewriting SQL statements to leverage on indexes which helps to reduce I/O. That is why, almost every tuning activity in any database servers is ultimately to reduce disk I/O. When we tune an SQL statement to replace a full-table scan with an index range scan, the performance improvement is the direct result of a reduction in disk I/O.

Well, the only other thing I can think of similar to without using SQL statements is probably LINQ or SQL CLR (which is still the same). It probably would not be the same as Cobol or DB2, I guess, since I am not familiar with. But still, can they achieve the same performance for large database files through accessing data directly?

Top 10 Contributor
Posts 2,284

tingshen:
One of my colleagues mentioned about improving server performance through programming with as least I/O as possible by reducing the use of SQL statement.
What kind of examples did he quote? That seems like a rather wide-covering and vague description.

It is not possible to cache all database data in memory - there simply ain't enough of it in any hardware platform today. What you certainly can do is cache pockets of frequently used result sets that don't get changed often. The SqlCacheDependency class is one such mechanism to limit database calls.

http://msdn2.microsoft.com/en-us/library/ms178604.aspx
http://msdn2.microsoft.com/en-us/library/e3w8402y(VS.80).aspx

The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

Top 25 Contributor
Posts 184
and using an index isn't always helpful. the values in the indexed column should be sufficiently unique with respect to the values in the other rows. for example if the column is a bit (0 or 1) it's useless to index. there should be sufficient variation among values in that column for an index to be useful.

http://devpinoy.org/blogs/cruizer

Page 1 of 1 (5 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems