<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title></title>
	<atom:link href="http://summeylabs.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://summeylabs.com/wordpress</link>
	<description></description>
	<lastBuildDate>Sat, 24 Mar 2012 18:20:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Taking the example of computer systems engineering for the analysis of biological cell systems</title>
		<link>http://summeylabs.com/wordpress/?p=221</link>
		<comments>http://summeylabs.com/wordpress/?p=221#comments</comments>
		<pubDate>Sat, 24 Mar 2012 18:20:36 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[Computer Engineering]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=221</guid>
		<description><![CDATA[Cool read &#160; computer_system_biocell &#160; -Summey]]></description>
			<content:encoded><![CDATA[<p>Cool read</p>
<p>&nbsp;</p>
<p><a href="http://summeylabs.com/wordpress/wp-content/uploads/2012/03/computer_system_biocell.pdf">computer_system_biocell</a></p>
<p>&nbsp;</p>
<p>-Summey</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=221</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Design</title>
		<link>http://summeylabs.com/wordpress/?p=210</link>
		<comments>http://summeylabs.com/wordpress/?p=210#comments</comments>
		<pubDate>Fri, 10 Feb 2012 15:03:31 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=210</guid>
		<description><![CDATA[Doing alot of reading about SharePoint. Currently checking out this book along with other sources across the web. Check out: HERE This is one of the books I am reading: Wrox &#8211; Professional SharePoint 2010 Branding and User Interface Design I &#8230; <a href="http://summeylabs.com/wordpress/?p=210">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Doing alot of reading about SharePoint. Currently checking out this book along with other sources across the web.</p>
<p>Check out: <a title="SharePoint Vids" href="http://msdn.microsoft.com/en-us/sharepoint/hh298298.aspx" target="_blank">HERE</a></p>
<p>This is one of the books I am reading: Wrox &#8211; Professional SharePoint 2010 Branding and User Interface Design</p>
<p><a href="http://summeylabs.com/wordpress/wp-content/uploads/2012/02/0000.jpg" rel="lightbox[210]" title="0000"><img class="alignnone size-thumbnail wp-image-211" title="0000" src="http://summeylabs.com/wordpress/wp-content/uploads/2012/02/0000-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>I like it, very good tutorials to follow along with.</p>
<p>&nbsp;</p>
<p>-Summey</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=210</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The beginnings of packet switching</title>
		<link>http://summeylabs.com/wordpress/?p=206</link>
		<comments>http://summeylabs.com/wordpress/?p=206#comments</comments>
		<pubDate>Sun, 29 Jan 2012 03:38:13 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[IT Notes]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=206</guid>
		<description><![CDATA[Super long read about packet switching, but informative. the_beginnings_of_packet_switching_2]]></description>
			<content:encoded><![CDATA[<p>Super long read about packet switching, but informative.</p>
<p><a href="http://summeylabs.com/wordpress/?attachment_id=207" rel="attachment wp-att-207">the_beginnings_of_packet_switching_2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=206</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bookmark ( anchor) link in SharePoint wiki pages</title>
		<link>http://summeylabs.com/wordpress/?p=182</link>
		<comments>http://summeylabs.com/wordpress/?p=182#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:32:53 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=182</guid>
		<description><![CDATA[Normally you can just do a simple bookmark on a SharePoint site page. Inside wiki pages this feature is missing. The only way I was able to create a bookmark is by doing the following. -Summey]]></description>
			<content:encoded><![CDATA[<p>Normally you can just do a simple bookmark on a SharePoint site page. Inside wiki pages this feature is missing. The only way I was able to create a bookmark is by doing the following.</p>
<p><a title="sharepoint" href="http://summeylabs.com/wordpress/wp-content/uploads/2012/01/capture.jpg" rel="lightbox[uniqueID|filename]"><img style="border: none;" src="http://summeylabs.com/wordpress/wp-content/uploads/2012/01/capture.jpg" alt="" width="300" height="400" border="0" /><br />
</a></p>
<p>-Summey</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=182</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv4 vs IPv6   FIGHT!!!!</title>
		<link>http://summeylabs.com/wordpress/?p=176</link>
		<comments>http://summeylabs.com/wordpress/?p=176#comments</comments>
		<pubDate>Sun, 22 Jan 2012 20:59:15 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[IT Notes]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=176</guid>
		<description><![CDATA[IPv4 IPv6 Addresses are 32 bits (4 bytes) in length. Addresses are 128 bits (16 bytes) in length Address (A) resource records in DNS to map host names to IPv4 addresses. Address (AAAA) resource records in DNS to map host &#8230; <a href="http://summeylabs.com/wordpress/?p=176">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="post-body entry-content">
<table width="391" border="1" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="191">
<p align="center"><strong><span style="font-family: verdana; font-size: 85%;">IPv4 </span></strong></p>
</td>
<td valign="top" width="198">
<p align="center"><strong><span style="font-family: verdana; font-size: 85%;">IPv6 </span></strong></p>
</td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Addresses are 32 bits (4 bytes) in length. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Addresses are 128 bits (16 bytes) in length </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Address (A) resource records in DNS to map host names to IPv4 addresses. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Address (AAAA) resource records in DNS to map host names to IPv6 addresses. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Pointer (PTR) resource records in the IN-ADDR.ARPA DNS domain to map IPv4 addresses to host names. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Pointer (PTR) resource records in the IP6.ARPA DNS domain to map IPv6 addresses to host names. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">IPSec is optional and should be supported externally </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">IPSec support is not optional </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Header does not identify packet flow for QoS handling by routers </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Header contains Flow Label field, which Identifies packet flow for QoS handling by router. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Both routers and the sending host fragment packets. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Routers do not support packet fragmentation. Sending host fragments packets </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Header includes a checksum. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Header does not include a checksum. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Header includes options. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Optional data is supported as extension headers. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">ARP uses broadcast ARP request to resolve IP to MAC/Hardware address. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Multicast Neighbor Solicitation messages resolve IP addresses to MAC addresses. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Internet Group Management Protocol (IGMP) manages membership in local subnet groups. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Multicast Listener Discovery (MLD) messages manage membership in local subnet groups. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Broadcast addresses are used to send traffic to all nodes on a subnet. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">IPv6 uses a link-local scope all-nodes multicast address. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Configured either manually or through DHCP. </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Does not require manual configuration or DHCP. </span></td>
</tr>
<tr>
<td valign="top" width="192"><span style="font-family: verdana; font-size: 85%;">Must support a 576-byte packet size (possibly fragmented). </span></td>
<td valign="top" width="197"><span style="font-family: verdana; font-size: 85%;">Must support a 1280-byte packet size (without fragmentation).</span></td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Want to know about the configuration of your system?</title>
		<link>http://summeylabs.com/wordpress/?p=172</link>
		<comments>http://summeylabs.com/wordpress/?p=172#comments</comments>
		<pubDate>Thu, 19 Jan 2012 17:07:15 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[IT Notes]]></category>
		<category><![CDATA[Server 2003]]></category>
		<category><![CDATA[Server 2008]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=172</guid>
		<description><![CDATA[1. Click on Start 2. Click on Run 3. Type cmd 4. In the command window type systeminfo and press enter. you can see all information you wanted. It also displays for how many days/hours you p.c is switched on &#8230; <a href="http://summeylabs.com/wordpress/?p=172">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>1. Click on Start<br />
2. Click on Run<br />
3. Type cmd<br />
4. In the command window type systeminfo and press enter.</p>
<p>you can see all information you wanted. It also displays for how many days/hours you p.c is switched on and not shutted down. you can give systeminfo /? and see various other options available with this command..</p>
<p>-Summey</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=172</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips about how to prevent SQL injection</title>
		<link>http://summeylabs.com/wordpress/?p=158</link>
		<comments>http://summeylabs.com/wordpress/?p=158#comments</comments>
		<pubDate>Wed, 04 Jan 2012 14:45:40 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=158</guid>
		<description><![CDATA[The key to preventing sql injection is never accepting inputs from the end user that you can glue into a sql statement. If you never have something from the outside that can become part of your sql statement then you &#8230; <a href="http://summeylabs.com/wordpress/?p=158">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The key to preventing sql injection is never accepting inputs from the end user that you can glue into a sql statement. If you never have something from the outside that can become part of your sql statement then you won&#8217;t get sql injection. If a user gives you inputs, they should be BOUND into the query and not concatenated. The second you concatenate user input into your SQL, it is as if you gave them the ability to pass you code and you execute that code. The goal therefore is to use bind variables and avoid concatenating your SQL statement.</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=158</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RAID Notes</title>
		<link>http://summeylabs.com/wordpress/?p=156</link>
		<comments>http://summeylabs.com/wordpress/?p=156#comments</comments>
		<pubDate>Sat, 31 Dec 2011 21:49:05 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[Server 2008]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=156</guid>
		<description><![CDATA[With RAID 5 you loose the space of 1 disk. eg. 6x200GB in RAID5 -&#62; 1000 GB With RAID 1 there is a &#8220;backup disk&#8221; for each disk so you loose half space eg. 6x200GB in RAID1 -&#62; 600 GB &#8230; <a href="http://summeylabs.com/wordpress/?p=156">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With RAID 5 you loose the space of 1 disk.<br />
eg. 6x200GB in RAID5 -&gt; 1000 GB</p>
<p>With RAID 1 there is a &#8220;backup disk&#8221; for each disk so you loose half space<br />
eg. 6x200GB in RAID1 -&gt; 600 GB</p>
<p>With RAID 1+0 you make RAID 1 arrays and then you combine them using RAID 0, so basically you loose half space<br />
eg. 6x200GB in RAID1+0 -&gt; 600 GB</p>
<p>&nbsp;</p>
<p>When you use disks of varying sizes in a RAID5 setup(I have only done this with zfs) you lose the space of the largest disk, i.e. &#8211; 3x300GB and 1x100GB and 1x200GB, you will lose 1x300GB disk -</p>
<p>But dont forget to take a spare into account .</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=156</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improve your insert statements performance</title>
		<link>http://summeylabs.com/wordpress/?p=148</link>
		<comments>http://summeylabs.com/wordpress/?p=148#comments</comments>
		<pubDate>Tue, 06 Dec 2011 21:09:35 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=148</guid>
		<description><![CDATA[BULK INSERT. bcp.exe, INSERT SELECT FROM OPENROWSET(BULK ...) . [...] regular INSERT SELECT Some of the insert methods perform minimal logging in certain circumstances.  <a href="http://summeylabs.com/wordpress/?p=148">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>BULK INSERT. bcp.exe, INSERT SELECT FROM OPENROWSET(BULK &#8230;) . [...] regular INSERT SELECT Some of the insert methods perform minimal logging in certain circumstances. Because writes to the transaction log in SQL Server are sequential, the amount of logging can affect an operation&#8217;s performance. [...] unless there are logical reasons for you to put the CREATE TABLE and INSERT SELECT statements in the same transaction, you can run the two in separate transactions.\n The output of the query gives you the count of log records, size written to the log in megabytes, and the duration in seconds. Continue reading by clicking on the link below.</p>
<p><a href="http://summeylabs.com/wordpress/wp-content/uploads/2011/12/Improve-your-insert-statements-performance.pdf">Improve your insert statements performance</a></p>
<p>&nbsp;</p>
<p>-Summey</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s the Code, Stupid!</title>
		<link>http://summeylabs.com/wordpress/?p=136</link>
		<comments>http://summeylabs.com/wordpress/?p=136#comments</comments>
		<pubDate>Thu, 01 Dec 2011 20:57:57 +0000</pubDate>
		<dc:creator>summey</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://summeylabs.com/wordpress/?p=136</guid>
		<description><![CDATA[It&#8217;s the Code, Stupid! Information Management Magazine, June 2005 Joe Celko Let me blurt out the punch line of this article in one sentence. The main performance problem in the huge majority of database applications is bad SQL code. It &#8230; <a href="http://summeylabs.com/wordpress/?p=136">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s the Code, Stupid!</p>
<p>Information Management Magazine, June 2005</p>
<p>Joe Celko</p>
<p>Let me blurt out the punch line of this article in one sentence. The main performance problem in the huge majority of database applications is bad SQL code. It is not lack of hardware. It is not network traffic. It is not slow front ends. All of those problems have been solved by technologies that made them commodities instead of major purchases and custom-built items.</p>
<p>Like what you see? Click here to sign up for Information Management&#8217;s daily newsletter to get the latest news, trends, commentary and more.</p>
<p>The next obvious question is: Why do we have bad SQL code? A big reason is that it is very easy to write bad SQL and difficult to write good SQL. If you can get a query to run at all, it will return something. If you get back the something you wanted to get, then life is good. But very often, you cannot tell if a result is right just by looking at the result set.</p>
<p><span id="more-136"></span></p>
<p>Testing is important, of course, but you need to cover all the possibilities. In a procedural language, you can filter the data one step at a time and inspect it at each step. If I have new data that is not expected, there is a good chance that it will cause a program fault or error message in a well-designed program. In effect, the program says &#8220;I don&#8217;t know what to do, so I am passing it to the user,&#8221; and then it is up to the user to think of something. In SQL, the weird data will not be selected and I keep getting the previous results.</p>
<p>We have centuries of data processing principles to assure correct procedural code that began with paper systems. We also have a lot of software tools and templates with which to build the front-end side of the application.</p>
<p>That culture does not really exist in SQL yet. Yes, there were declarative and functional languages before SQL, but they were not popular enough to get the support culture that procedural languages have. Other than formal logic, there are only heuristics to help the SQL programmer. To make this clearer, when I want to do a sort in a procedural language, I have algorithms, which are so well known that they have names such as QuickSort, heap sort, Bubble sort and so forth. Can you recall an SQL programming method that has a name?</p>
<p>In SQL, you are actually writing a program specification. What do we, as programmers, know about writing good specifications? This must be really difficult because we seldom saw a good, clear one when we were coding in procedural languages! In the 1970s, Zohar Manna demonstrated this fact at conferences by taking the problem of sorting an array of integers. He would come up with several &#8220;solutions&#8221; that met the spec, but destroyed the data. By the way, his classic Mathematical Theory of Computation is back in print (Dover Publications, ISBN 0-486-43238-6).</p>
<p>Traditionally, analysis and coding were separate skills. Did anyone give the SQL programmer training for both skills? I would bet not. The usual way that someone becomes an SQL programmer is that their shop gets an RDBMS product, the programmers get a minimal introduction to the product and then they start writing embedded SQL code. It takes six years to become a Union Journeyman Carpenter. I would be willing to bet that most production SQL databases are built by programmers with far less experience.</p>
<p>What do the newbie SQL programmers bring to the job? For the most part, the &#8220;wrong stuff&#8221; instead of the &#8220;right stuff.&#8221; A skill set developed for procedural languages is actually dangerous in the relational world. A procedural programmer sees the world as sequences of discrete records; an SQL programmer thinks in sets. The newbie SQL programmer will often use cursors to sequentially process a table like a file rather than use a simple single set-oriented SQL statement. Cursors are orders of magnitude slower and mess up concurrency, but a cursor FETCH looks and acts like a READ statement.</p>
<p>How bad can this be? From my personal experience at an educational testing company, I was able to make one procedure 2,300 times faster and 300 lines of code shorter. This was extreme, but improvements of two to three orders of magnitude are common. The bottleneck was one programmer. All of his code was so bad that it did not matter that his routines were not called that often &#8211; a bomb does not have to go off very often to do damage.</p>
<p>In a procedural language, such as COBOL, FORTRAN, Java or C++, the same program will compile to the same executable code on the same platform for the same compiler every time. SQL is a declarative language that must decide how to implement the statements it is given. The optimizer looks for access methods (usually indexes) and statistics about the table sizes, data distributions in the columns and a dozen other factors to create the execution plan for the query.</p>
<p>The SQL programmer might write code that is good for the current contents of the database. Later, the statistics change and the code performs poorly. Most of the time, recompiling the code with the new statistics will solve a short-term problem. Exactly how and when you can recompile your code will vary with each product.</p>
<p>However, recompiling does not always work; sometimes the entire query needs to be replaced. As an example of this problem, consider the nested EXISTS( ) predicates version of relational division made popular by Chris Date&#8217;s textbooks and the COUNT(*) version of relational division, which I made popular. The winter 1996 edition of DB2 Online Magazine (http://www.db2mag.com/db_area/archives/1996/q4/9601lar.shtml) had an article entitled &#8220;Powerful SQL: Beyond the Basics&#8221; by Sheryl Larsen, which gave the results of testing both methods. Her conclusion for DB2 was that the nested EXISTS( ) version is better when the quotient has less than 25 percent of the dividend table&#8217;s rows and the COUNT(*) version is better when the quotient is more than 25 percent of the dividend table.</p>
<p>The Ingres optimizer was smart enough to find the equivalence, used the same execution plan and gave the best performance for all the queries. The other products at the time gave very uneven performances. The worst timing was an order of magnitude or more than the best. In the case of Oracle, the worst timing was more than 600 times the best. Products are better now, but this illustrates the point.</p>
<p>Bad Schema Design</p>
<p>Are inexperienced programmers the only source of bad SQL code? No, I would say that most bad SQL code is the result of bad schema design. It is fairly easy to write code against a normalized, well-designed database. Data integrity is enforced by the constraints, DRI actions and perhaps some triggers, but not by procedural code. The joins are obvious. The data uses industry standards. In short, it feels like a comfortable tool in your hand.</p>
<p>However, in a poorly designed schema, you need excessive joins to get to data. Temporary tables are used to hold intermediate results that should have been hidden in a derived table. Extra code is needed to remove redundancies that should not have existed in the first place. There are too many nulls and non-standard codes. Proprietary auto-numbering is used in place of actual relational keys, so there is no validation or verification of the data. The schema contains so many proprietary features that it cannot be ported or maintained by anyone who is not an expert in that dialect of SQL. In short, you cannot trust anything and must add code to protect yourself.</p>
<p>The best SQL programmer cannot overcome a bad schema. The most he can hope to achieve is a query that works right and runs &#8220;good enough&#8221; for now, even though we know it will not scale up. This is an important point with SQL versus procedural programming. Most procedural programs are linear &#8211; if you have twice as many records in a file, it takes approximately twice as long to process.</p>
<p>A good SQL query can have linear or less than linear growth as the table sizes increase. However, a bad SQL query can have exponential growth as the table size increases. This is usually a result of hidden cross joins, poor indexing and other factors that lead to multiple passes over the same data.</p>
<p>The first response to a performance problem is to buy monitoring and diagnostic software. These tools are useful and have their place, but they cannot solve the root problem. If you locate a procedure that is performing poorly, telling the programmer who wrote it to fix it is not going to make him smarter. He might be able to make some improvements, but unless he has made himself smarter, the new code will be written at the same competency level as the old code.</p>
<p>Another factor is that most organizations lack a feedback loop. If one front-end application programmer discovers that a business rule is not enforced on the database side of the house, he will put it into his code (&#8220;VIN numbers do not allow certain letters in certain positions&#8221;). That is mopping up the spill. The programmer should not be doing this; those rules belong on the database side or in a rules engine. That is fixing the leak.</p>
<p>The worst case scenario is that the database has no constraint at all. The database has a &#8220;Lamborghini Civic&#8221; manufactured in 1950, and that is just fine. Now several programmers have slightly different ideas about the rules for fixing this. In one program, the &#8220;Lamborghini Civic&#8221; is just fine; but in another, it is corrected to a &#8220;Honda Civic.&#8221; In a third, it never appears, but shows up in the totals, etc.</p>
<p>Most organizations have no way for a programmer to send a memo to the DBA to tell him we need a CHECK( ) constraint on the table for this rule. Furthermore, if the DBA did add the constraint later, most organizations have no way to tell the programmers to drop the extra front-end code and catch the constraint exception in the usual way.</p>
<p>Solutions</p>
<p>First, spend the money to train programmers in SQL. They cannot train themselves. They cannot learn it from a few books in a weekend. This is a better use of money than software tools.</p>
<p>Second, set up a feedback mechanism between the application and the database sides of the house. This will let you know what the business rules actually are.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://summeylabs.com/wordpress/?feed=rss2&#038;p=136</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

