<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: O/R-Ms: Panacea or Polio Braces?</title>
	<atom:link href="http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces/feed" rel="self" type="application/rss+xml" />
	<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces</link>
	<description>Jeremiah Peschka&#039;s ruminations on sql, ruby, c#, and other things</description>
	<lastBuildDate>Wed, 28 Jul 2010 14:05:12 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1056</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Thu, 07 Jan 2010 12:36:31 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1056</guid>
		<description>I follow you now and I&#039;m completely in agreement. Regression tests only help when you run them and pay attention to the output.</description>
		<content:encoded><![CDATA[<p>I follow you now and I&#8217;m completely in agreement. Regression tests only help when you run them and pay attention to the output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geir</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1055</link>
		<dc:creator>Geir</dc:creator>
		<pubDate>Thu, 07 Jan 2010 11:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1055</guid>
		<description>&gt;Solving the automated regression testing problem can be pretty easily solved

Sure. What I am saying is that I only know one database-centric developer who actually is _doing_ this with some success. Ambler seems to have the same experience.

My comment was not about the technology. I don´t really care much about which technology people prefer. It was a musing on development cultures.

The people I work with don´t test their stored procedures. Testing does not require specialized technology, as you say. You just have to do it and make sure it gives you some value - that stuff continues to work in the future. 

I can´t use stuff without automated regression tests. It is going to fall apart, given enough time. Someone will probably complain about the complexity, and then suggest replacing the stored procedures with something else - like an ORM framework, or Cobol - which will also not work out in the long run if the underlying problem hasn´t been fixed. A couple of years later, this will repeat, in extreme cases causing a shift back to the original technology.

It really is this simple. Most failures are not caused by using the wrong technologies. It is caused by people misapplying them.</description>
		<content:encoded><![CDATA[<p>&gt;Solving the automated regression testing problem can be pretty easily solved</p>
<p>Sure. What I am saying is that I only know one database-centric developer who actually is _doing_ this with some success. Ambler seems to have the same experience.</p>
<p>My comment was not about the technology. I don´t really care much about which technology people prefer. It was a musing on development cultures.</p>
<p>The people I work with don´t test their stored procedures. Testing does not require specialized technology, as you say. You just have to do it and make sure it gives you some value &#8211; that stuff continues to work in the future. </p>
<p>I can´t use stuff without automated regression tests. It is going to fall apart, given enough time. Someone will probably complain about the complexity, and then suggest replacing the stored procedures with something else &#8211; like an ORM framework, or Cobol &#8211; which will also not work out in the long run if the underlying problem hasn´t been fixed. A couple of years later, this will repeat, in extreme cases causing a shift back to the original technology.</p>
<p>It really is this simple. Most failures are not caused by using the wrong technologies. It is caused by people misapplying them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1054</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Thu, 07 Jan 2010 11:28:01 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1054</guid>
		<description>Thanks for the compliment. I am going to pick on your last comment, though. The lack of one feature should never discourage you from using another. We are, after all, developers. Solving the automated regression testing problem can be pretty easily solved through using DDL triggers and some kind of &lt;a href=&#039;http://facility9.com/2009/02/16/automating-t-sql-testing&#039; rel=&quot;nofollow&quot;&gt;automated dynamic test SQL&lt;/a&gt;. Or, if you&#039;re on TFS, you can use VSTS:Database Developer edition and use TFS to run your tests through a continuous integration process. The capabilities are there to use this as a feature, you just need to build it because an RDBMS is not a development platform.

I&#039;m not familiar with the Ambler/Sadalage book, but if they do discourage the use of stored procedures, I have to wonder what they have to say in the other 383 pages of their book.</description>
		<content:encoded><![CDATA[<p>Thanks for the compliment. I am going to pick on your last comment, though. The lack of one feature should never discourage you from using another. We are, after all, developers. Solving the automated regression testing problem can be pretty easily solved through using DDL triggers and some kind of <a href='http://facility9.com/2009/02/16/automating-t-sql-testing' rel="nofollow">automated dynamic test SQL</a>. Or, if you&#8217;re on TFS, you can use VSTS:Database Developer edition and use TFS to run your tests through a continuous integration process. The capabilities are there to use this as a feature, you just need to build it because an RDBMS is not a development platform.</p>
<p>I&#8217;m not familiar with the Ambler/Sadalage book, but if they do discourage the use of stored procedures, I have to wonder what they have to say in the other 383 pages of their book.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geir</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1053</link>
		<dc:creator>Geir</dc:creator>
		<pubDate>Thu, 07 Jan 2010 11:16:39 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1053</guid>
		<description>Good post.

I am missing one book from your references list, though. &quot;Database refactoring&quot; by Ambler/Sadalage.

Of course, they discourage the use of stored procedures because most DB-driven development got stuck in the 1970s, and consequently do not have automated regression tests. I have to say I have to agree on that one.</description>
		<content:encoded><![CDATA[<p>Good post.</p>
<p>I am missing one book from your references list, though. &#8220;Database refactoring&#8221; by Ambler/Sadalage.</p>
<p>Of course, they discourage the use of stored procedures because most DB-driven development got stuck in the 1970s, and consequently do not have automated regression tests. I have to say I have to agree on that one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GilaMonster</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1046</link>
		<dc:creator>GilaMonster</dc:creator>
		<pubDate>Wed, 06 Jan 2010 17:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1046</guid>
		<description>Parameterised (badly) queries from the front end, built up automatically according to user&#039;s permissions and app settings. It could get that size within 2 days, so it wasn&#039;t a long build up. Index rebuilds once a week. 64 bit server with 64GB of memory, I think 58 was given to SQL and it used every byte. (1.2 TB database)

Sure, it was controllable, with FreeProcCache running every now and again, but that&#039;s not really the point. It took memory that we would rather have seen go to the data cache (and so reduce the I/O load on the disks). The developers thought the same as you stated, lots of cached plans won&#039;t harm anything, we have a big server. 

I was just contesting your statement that multiple plan cache entries are &quot;[usually] not a big concern with today’s x64 systems with lots of RAM etc.&quot; They can still be a big concern even with lots of memory. 

There were other side effects of this design too. A large (too large) ObjectandUserPermTokenStore being one of them.</description>
		<content:encoded><![CDATA[<p>Parameterised (badly) queries from the front end, built up automatically according to user&#8217;s permissions and app settings. It could get that size within 2 days, so it wasn&#8217;t a long build up. Index rebuilds once a week. 64 bit server with 64GB of memory, I think 58 was given to SQL and it used every byte. (1.2 TB database)</p>
<p>Sure, it was controllable, with FreeProcCache running every now and again, but that&#8217;s not really the point. It took memory that we would rather have seen go to the data cache (and so reduce the I/O load on the disks). The developers thought the same as you stated, lots of cached plans won&#8217;t harm anything, we have a big server. </p>
<p>I was just contesting your statement that multiple plan cache entries are &#8220;[usually] not a big concern with today’s x64 systems with lots of RAM etc.&#8221; They can still be a big concern even with lots of memory. </p>
<p>There were other side effects of this design too. A large (too large) ObjectandUserPermTokenStore being one of them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KristoferA</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1042</link>
		<dc:creator>KristoferA</dc:creator>
		<pubDate>Wed, 06 Jan 2010 05:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1042</guid>
		<description>Actually no, I have never seen a 20Gb procedure cache. A few hundred megabytes, yes, and that was on a system that was hit mainly by unparameterized ad-hoc SQL (and running SQL server 2000 SP1 :) ).

It would be very interesting to know more about the 20Gb proc cache though, and/or more details on how it got that big. I can imagine that there must be a lot of ad-hoc (unparameterized?) SQL involved and that it builds up over a long time? Lots of system resources available for SQL server to not bump things out of the proc cache? And no maintenance plans forcing recompile? Was it controllable from the db-side, e.g. through sp_recompile?

With update statistics, maybe a bit of sp_recompile etc sprinkled here and there in maintenance plans that are run not too infrequently I would expect it to be controllable from the server side even with completely dynamic ad-hoc SQL queries...</description>
		<content:encoded><![CDATA[<p>Actually no, I have never seen a 20Gb procedure cache. A few hundred megabytes, yes, and that was on a system that was hit mainly by unparameterized ad-hoc SQL (and running SQL server 2000 SP1 <img src='http://facility9.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</p>
<p>It would be very interesting to know more about the 20Gb proc cache though, and/or more details on how it got that big. I can imagine that there must be a lot of ad-hoc (unparameterized?) SQL involved and that it builds up over a long time? Lots of system resources available for SQL server to not bump things out of the proc cache? And no maintenance plans forcing recompile? Was it controllable from the db-side, e.g. through sp_recompile?</p>
<p>With update statistics, maybe a bit of sp_recompile etc sprinkled here and there in maintenance plans that are run not too infrequently I would expect it to be controllable from the server side even with completely dynamic ad-hoc SQL queries&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1041</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Tue, 05 Jan 2010 20:39:11 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1041</guid>
		<description>Hi Gareth, Glad you liked the article. I&#039;m even happier to hear that you guys are trying to bring the fun back to the plumbing bits. I&#039;m going to send you the info of the developer who has the info to reproduce the issue. That way I don&#039;t end up paraphrasing.</description>
		<content:encoded><![CDATA[<p>Hi Gareth, Glad you liked the article. I&#8217;m even happier to hear that you guys are trying to bring the fun back to the plumbing bits. I&#8217;m going to send you the info of the developer who has the info to reproduce the issue. That way I don&#8217;t end up paraphrasing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Hayter</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1040</link>
		<dc:creator>Gareth Hayter</dc:creator>
		<pubDate>Tue, 05 Jan 2010 20:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1040</guid>
		<description>Great article, thanks. I really like your balanced view.

I notice that you talked about our product, Visual NHibernate, and said &quot;The tool isn’t always right so we have to go back and fix our mappings.&quot;. If this is in regards to Visual NHibernate then please let us know what the problems are so that we can fix them ASAP. We are trying to bring the fun back into this area of software development - thanks for helping us!</description>
		<content:encoded><![CDATA[<p>Great article, thanks. I really like your balanced view.</p>
<p>I notice that you talked about our product, Visual NHibernate, and said &#8220;The tool isn’t always right so we have to go back and fix our mappings.&#8221;. If this is in regards to Visual NHibernate then please let us know what the problems are so that we can fix them ASAP. We are trying to bring the fun back into this area of software development &#8211; thanks for helping us!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1039</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 05 Jan 2010 19:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1039</guid>
		<description>Dude, the same complexity in ORMs such as NHibernate is present in your DB administration tasks, you gave example of this when you talk about specifying indexes, saving query plans and all other stuff you DBA voodoo priests can do.

All ORMs strive to get a good compromise, although I grant you that most of them tend to be a little more complicated than what is needed. An ORM is a shift of complexity from DB to application language, although the details make up for the additional complexity.
Let&#039;s take Hibernate mappings: they&#039;re a pain, but you can say that its

Even when you speak of OODBs such as db4o, its just another complexity shift from the SQL engine to the db4o storage engine.

The bottom line is: if you think an ORM is a panacea, you&#039;re still in the last century. I though by know everyone should know that an abstraction layer doesn&#039;t solve all your problems. Besides, it also depends on how you use the DB (see Martin Fowler&#039;s application database vs. integration database). For integration databases, it makes sense to shift some of the logic to the DB, although you can still use an ORM.</description>
		<content:encoded><![CDATA[<p>Dude, the same complexity in ORMs such as NHibernate is present in your DB administration tasks, you gave example of this when you talk about specifying indexes, saving query plans and all other stuff you DBA voodoo priests can do.</p>
<p>All ORMs strive to get a good compromise, although I grant you that most of them tend to be a little more complicated than what is needed. An ORM is a shift of complexity from DB to application language, although the details make up for the additional complexity.<br />
Let&#8217;s take Hibernate mappings: they&#8217;re a pain, but you can say that its</p>
<p>Even when you speak of OODBs such as db4o, its just another complexity shift from the SQL engine to the db4o storage engine.</p>
<p>The bottom line is: if you think an ORM is a panacea, you&#8217;re still in the last century. I though by know everyone should know that an abstraction layer doesn&#8217;t solve all your problems. Besides, it also depends on how you use the DB (see Martin Fowler&#8217;s application database vs. integration database). For integration databases, it makes sense to shift some of the logic to the DB, although you can still use an ORM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GilaMonster</title>
		<link>http://facility9.com/2010/01/05/or-ms-panacea-or-polio-braces#comment-1038</link>
		<dc:creator>GilaMonster</dc:creator>
		<pubDate>Tue, 05 Jan 2010 18:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1266#comment-1038</guid>
		<description>Seen a 20GB procedure cache recently? I have, and it came from using prepared, generated statements SQL statements. (not an OR-mapper though). 

Yes, on the big x64 servers with lots of memory the procedure cache can get very large, but that&#039;s not a good thing. The larger the procedure cache is, the less memory there is for caching data, which means that SQL goes to disk more often, making that limited I/O bandwidth more of a bottleneck than it should be.</description>
		<content:encoded><![CDATA[<p>Seen a 20GB procedure cache recently? I have, and it came from using prepared, generated statements SQL statements. (not an OR-mapper though). </p>
<p>Yes, on the big x64 servers with lots of memory the procedure cache can get very large, but that&#8217;s not a good thing. The larger the procedure cache is, the less memory there is for caching data, which means that SQL goes to disk more often, making that limited I/O bandwidth more of a bottleneck than it should be.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
