<?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>Bicosyes - since evermore... &#187; Desarrollo de software</title>
	<atom:link href="http://bicosyes.com/category/desarrollo-de-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://bicosyes.com</link>
	<description></description>
	<lastBuildDate>Sat, 06 Mar 2010 20:03:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Backup incremental de tu base de datos con Git</title>
		<link>http://bicosyes.com/backup-incremental-de-tu-base-de-datos-con-git/</link>
		<comments>http://bicosyes.com/backup-incremental-de-tu-base-de-datos-con-git/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:48:13 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Bases de Datos]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=858</guid>
		<description><![CDATA[Una forma realmente interesante de realizar backups de tus bases de datos (por ser trivial y muy potente) es usando Git. El proceso es simple y se basa en la realización de los dumps de la base de datos de &#8230; <a href="http://bicosyes.com/backup-incremental-de-tu-base-de-datos-con-git/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Una forma realmente interesante de realizar backups de tus bases de datos (por ser <strong>trivial</strong> y muy potente) es usando <strong><a href="http://git-scm.com/">Git</a></strong>. El proceso es simple y se basa en la realización de los dumps de la base de datos de forma que cada <strong>fila</strong> de las tablas sea <strong>un</strong> <em>insert</em> aislado, de esa forma en cada commit solo estaremos salvando las diferencias respecto al último estado (tanto <em>deletes</em> como <em>inserts</em>, como <em>updates</em>).</p>
<p>En el caso concreto de <a href="http://www.mysql.com/">MySQL</a> inicialmente haríamos algo como esto:</p>
<pre class="bash">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> mydatabase &amp;&amp; <span style="color: #7a0874; font-weight: bold;">cd</span> mydatabase
$ mysqldump --skip-extended-insert &gt; data.sql
$ git init
$ git add data.sql
$ git commit -m <span style="color: #ff0000;">&quot;Initial dump of mydatabase&quot;</span></pre>
<p>A partir de entonces podemos automatizar el proceso con un script tan simple como este:</p>
<pre class="bash">$ <span style="color: #c20cb9; font-weight: bold;">cat</span> /usr/bin/git_backup_database
<span style="color: #808080; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">BACKUP_DIRECTORY=</span>$<span style="color: #000000;">1</span>
<span style="color: #007800;">DATABASE=</span>$<span style="color: #000000;">2</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$BACKUP_DIRECTORY</span> &amp;&amp; \
mysqldump --skip-extended-insert <span style="color: #007800;">$DATABASE</span> &gt; data.sql &amp;&amp; \
git commit -am <span style="color: #ff0000;">&quot;Updating dump `date +%Y_%m_%d__%H_%M`&quot;</span></pre>
<p>Según el volumen de consultas que tenga tu base de datos, te será interesante ponerlo en <strong>cron</strong> con una frecuencia determina u otra. Adicionalmente sería recomendable ejecutar <em>$ git gc</em> para optimizar el repositorio. Por ejemplo, dos veces al día y una vez a la semana mantenimiento:</p>
<pre class="bash"><span style="color: #000000;">0</span> <span style="color: #000000;">0</span> * * * /usr/bin/git_backup_database /path/to/mydatabase mydatabase
<span style="color: #000000;">0</span> <span style="color: #000000;">12</span> * * * /usr/bin/git_backup_database  /path/to/mydatabase mydatabase
<span style="color: #000000;">0</span> <span style="color: #000000;">1</span> * * <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">cd</span> /path/to/mydatabase &amp;&amp; git <span style="color: #c20cb9; font-weight: bold;">gc</span></pre>
<p>Además desde otro equipo nadie te impide hacer un <em>$ git clone ssh://equipo:path/to/mydatabase</em> y tener todo el historial de la base de datos en un plis (bueno eso es relativo, que ocupará lo suyo...) o incluso programar un <em>$ git pull</em> para tener varios backups en distintas maquinas. En definitiva, se abren un sinfín de opciones <img src='http://bicosyes.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<img src="http://bicosyes.com/?ak_action=api_record_view&id=858&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/backup-incremental-de-tu-base-de-datos-con-git/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>La elite de los programadores, los que leen</title>
		<link>http://bicosyes.com/la-elite-de-los-programadores-los-que-leen/</link>
		<comments>http://bicosyes.com/la-elite-de-los-programadores-los-que-leen/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 19:46:01 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Desarrollo de software]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://bicosyes.com/?p=654</guid>
		<description><![CDATA[Comentario con miga de Joel Spolsky, que se podría traducir algo así como: La audiencia que lee Coding Horror y la audiencia que lee Joel On Software están ya entre la elite de los programadores, porque son los tipo de &#8230; <a href="http://bicosyes.com/la-elite-de-los-programadores-los-que-leen/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Comentario con miga de Joel Spolsky, que se podría traducir algo así como:</p>
<blockquote><p>La audiencia que lee <a href="http://www.codinghorror.com/blog/">Coding Horror</a> y la audiencia que lee <a href="http://www.joelonsoftware.com/">Joel On Software</a> están ya entre la elite de los programadores, porque son los tipo de personas que leen cosas con el propósito de mejorar sus cualidades. Y son, así a ojo de buen cubero, 5-10% del total de programadores activos.</p>
<p>No es la gran masa de carne java quienes fueron anteriormente machacateclas en visual basic quienes fueron previamente tiralíneas de cobol quienes están haciendo ahora grandes cantidades de historias extremadamente aburridas internamente en algún lugar. Ah, ¿No te he ofendido?.
</p></blockquote>
<p>Más que elite yo los llamaría decentes. Más sobre el tema <a href="http://cycle-gap.blogspot.com/2008/08/programming-elite-programmers-who-read.html">aquí</a>.</p>
<img src="http://bicosyes.com/?ak_action=api_record_view&id=654&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/la-elite-de-los-programadores-los-que-leen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RESTful Web Services</title>
		<link>http://bicosyes.com/restful-web-services/</link>
		<comments>http://bicosyes.com/restful-web-services/#comments</comments>
		<pubDate>Sun, 11 May 2008 16:27:46 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Libros técnicos]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://bicosyes.com/restful-web-services/</guid>
		<description><![CDATA[Hace ya un tiempo que me acabé este libro. Su tema principal son los servicios web en general y los acordes a los principios REST en particular. El libro contiene una 400 páginas, las cuales podrían resumirse y condensarse en &#8230; <a href="http://bicosyes.com/restful-web-services/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="flota" src='http://bicosyes.com/wp-content/uploads/2008/05/restful.jpg' alt='Portada de “RESTful Web Services”' />Hace ya un tiempo que me acabé <a href="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260">este libro</a>. Su tema principal son los <strong>servicios web</strong> en general y los acordes a los principios <strong>REST</strong> en particular. </p>
<p>El libro contiene una 400 páginas, las cuales podrían resumirse y condensarse en una cuarta parte sin problemas, pero el autor continuamente está dando ejemplos y situaciones para plasmar cada concepto que explica. Incluso tenemos implementado, mostrando todo el código, un servicio web completo (gracias en parte a la brevedad de ruby).</p>
<p>¿<strong>Qué</strong> nos podemos esperar después de leerlo? Comprender de una vez por todas qué es eso del <em>REST</em>, término que asiduamente es malinterpretado y se ha convertido en una de las palabras clave a mencionar para quedar como si entendieses del tema (ya si lo nombras junto con rails, j2ee y <em>[algo]</em> business eres el puto amo).</p>
<p>¿Cuáles son los <strong>contenidos</strong>? En una primera parte nos habla de los servicios web en general, algo que puede servir para poner en contexto a quien no comprenda o este al tanto de qué y cómo son realmente. </p>
<p>Justo a continuación se nos explica toda la <strong>teoría</strong> y conceptos relacionados con la arquitectura orientada a recursos (<acronym title="resource oriented architecture"><strong>ROA</strong></acronym>), la base y propósito de todo libro. Luego tenemos una aplicación de estos conceptos, tanto a nivel de diseño como a nivel de implementación. Estos capítulos, totalmente <strong>prácticos</strong>, sirven para afianzar todo lo anteriormente explicado, pues en pocas páginas el autor diseña e implementa aplicaciones <em>reales</em> (diseña un servicio de mapas, e implementa un agregador tipo <em>del.icio.us</em>). Después tenemos explicaciones concretas de aspectos específicos que podría llegar a tomarse como una referencia para crear servicios web que será realmente útil para cuando volvamos a recurrir al libro en momentos concretos de dudas.</p>
<p>Finalmente se hacen unas comparaciones con los <em>WS-*</em>, para mi sorpresa, sin meterse mucho con ellos (y no será por oportunidades...), pero que después de haber leído todo lo anterior choca bastante como todavía pueden existir cosas tan increíblemente estúpidas y absurdas (¡y que encima todavía se usan!). Para concluir también tendremos el capítulo de rigor sobre ajax y sus implicaciones al usar servicios web rest (pues una aplicación ajax puede tomarse como un mero cliente de un servicio web) y un breve recorrido sobre frameworks existentes que tratan REST (rails en ruby, django en python y restlet en java).</p>
<p>Este es un libro que lo recomiendo encarecidamente a cualquiera que esté o vaya a crear aplicaciones <strong>Web</strong> (que a día de hoy es como decir a todo el mundo). Incluso para quien crea haber usado exitosamente REST. Pues dada su popularidad creciente, es un término que continuamente se está enseñando y usando erróneamente (me incluyo aquí el primero, y eso que mi pfc iba sobre eso). Ha sido uno de los libros más vendidos del 2007 (de desarrollo de software claro) y no ha recibido pocos elogios que digamos. </p>
<p class="frase">Every developer working with the Web needs to read this book</p>
<p class="author"><a href="http://en.wikipedia.org/wiki/David_Heinemeier_Hansson">David Heinemeier Hansson</a>, creador de Ruby on Rails</p>
<p>Simplemente, un libro <strong>magnifico</strong>.</p>
<img src="http://bicosyes.com/?ak_action=api_record_view&id=628&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/restful-web-services/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Benchmark MySQL vs PostgreSQL vs SQLite vs MSAccess (vs ruby)</title>
		<link>http://bicosyes.com/benchmark-mysql-vs-postgresql-vs-ruby/</link>
		<comments>http://bicosyes.com/benchmark-mysql-vs-postgresql-vs-ruby/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 22:19:27 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Bases de Datos]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://bicosyes.com/benchmark-mysql-vs-postgresql-vs-ruby/</guid>
		<description><![CDATA[Por razones que no vienen al caso, me he encontrado hoy con un increíble WTF? usando MySQL (la lista no es corta, pero este era sorprendente, digno de Access o peor). He decidido hacer una comparativa con uno de sus &#8230; <a href="http://bicosyes.com/benchmark-mysql-vs-postgresql-vs-ruby/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Por razones que no vienen al caso, me he encontrado hoy con un increíble <acronym title="What The fuck? (¿y esto cómo se come?)">WTF?</acronym> usando <strong>MySQL</strong> (la lista no es corta, pero este era sorprendente, digno de Access o peor). He decidido hacer una comparativa con uno de sus competidores directos, <strong>PostgreSQL</strong>. Además probaré a intentar resolver el <em>problema</em> usando código en vez de dejar todo el "trabajo" a la base de datos, en concreto lo haré todo en ruby, no por eficiencia sino por comodidad (que sino me canso). </p>
<p><strong>[Actualización 6 abril 2008 @ 19h]</strong> Ya puestos, he añadido también SQLite y Microsoft Access.</p>
<p>Presentemos el problema, tenemos dos tablas, <strong>A</strong> y <strong>B</strong>, cada una de ellas tiene una clave primaria compuesta por <strong>dos</strong> campos. Queremos averiguar las tuplas de la primera tabla que tienen como valor en uno de sus campos, valores que no se encuentran en ninguna tupla de la segunda tabla. Es decir una resta simplemente. Poniéndolo decentemente sería tal que:</p>
<ul>
<li>Tablas:
<ul>
<li>A(<u>id</u>, <u>otro_id</u>)</li>
<li>B(<u>id</u>, <u>otro_id</u>)</li>
</ul>
</li>
<li>Objetivo: tuplas de A para las cuales no existe ningún elemento en B cuyo valor del campo <em>otro_id</em> sea igual al campo <em>otro_id</em> de A
<ul>
<li>Formalmente: x ɛ A. ∀y ɛ B y.otro_id != x.otro_id</li>
<li>SQL: Lo más intuitivo y simple sería
<pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> A <span style="color: #993333; font-weight: bold;">WHERE</span> A.otro_id <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> B.otro_id <span style="color: #993333; font-weight: bold;">FROM</span> B<span style="color: #66cc66;">&#41;</span></pre>
<p>o usando LEFT JOINs también es simple expresarlo
<pre class="sql"><span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> A <span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> B <span style="color: #993333; font-weight: bold;">USING</span> <span style="color: #66cc66;">&#40;</span>otro_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> B.otro_id <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NULL</span></pre>
</li>
</ul>
</li>
</ul>
<p>Creo que es algo bastante evidente y simple de entender. Aplicado al MundoReal&reg; puede surgir bastantes veces, no es que estemos antes un tipo de consulta retorcida ni nada por el estilo. Habría que resaltar que estamos usando <strong>parte</strong> de la clave primaria, en ambas tablas involucradas, por lo que en principio la intuición y nuestros conocimientos de bases de datos relaciones nos sugieren que esto va a ir más rápido que el correcaminos. </p>
<p>¿<strong>Cómo</strong> resolverías esta consulta?, No me hagas pensar, veamos <a href="http://www.postgresql.org/docs/8.3/static/sql-explain.html">qué nos dice</a> <em>Postgre</em>:</p>
<pre class="sql">foo=<span style="color: #808080; font-style: italic;"># EXPLAIN SELECT * FROM A WHERE A.otro_id NOT IN (SELECT B.otro_id FROM B);</span>
                          QUERY PLAN
 Seq Scan <span style="color: #993333; font-weight: bold;">ON</span> a  <span style="color: #66cc66;">&#40;</span>cost=<span style="color: #cc66cc;">189.91</span>..<span style="color: #cc66cc;">379.84</span> rows=<span style="color: #cc66cc;">4877</span> width=<span style="color: #cc66cc;">24</span><span style="color: #66cc66;">&#41;</span>
   Filter: <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #66cc66;">&#40;</span>hashed subplan<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
   SubPlan
     -&gt;  Seq Scan <span style="color: #993333; font-weight: bold;">ON</span> b  <span style="color: #66cc66;">&#40;</span>cost=<span style="color: #cc66cc;">0.00</span>..<span style="color: #cc66cc;">165.53</span> rows=<span style="color: #cc66cc;">9753</span> width=<span style="color: #cc66cc;">12</span><span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>Parece buen plan, primero hará un hash de los valores que se le indican en <em>B</em>, le da un coste de menos de 2 décimas (son milésimas los valores) y calcula que devolverá 9753 columnas (que son todas las que hay), luego dice que filtrará todos los de A que no se encuentren en ese hash. Es lo que le hemos pedido, correcto. A este segundo paso le da una estimación de menos de 2 décimas también, y cree que saldrán 4877 resutlados (esto son todo estimaciones, postgre ahora mismo no ha ejecutado nada, solo nos cuenta su vida).</p>
<p><em>MySQL</em> es un poco más tímido y <a href="http://dev.mysql.com/doc/refman/5.0/en/using-explain.html">no da tanto detalle</a>, pero también podemos pedir que nos explique qué va a hacer:</p>
<pre class="mysql">mysql&gt; <span style="color: #993333; font-weight: bold;">EXPLAIN</span> <span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> A <span style="color: #993333; font-weight: bold;">WHERE</span> A.otro_id <span style="color: #aa3399; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> B.otro_id <span style="color: #993333; font-weight: bold;">FROM</span> B<span style="color: #66cc66;">&#41;</span> \G
*************************** <span style="color: #cc66cc;">1</span>. row ***************************
           id: <span style="color: #cc66cc;">1</span>
  select_type: PRIMARY
        table: A
         type: index
possible_keys: <span style="color: #aa3399; font-weight: bold;">NULL</span>
          key: PRIMARY
      key_len: <span style="color: #cc66cc;">178</span>
          ref: <span style="color: #aa3399; font-weight: bold;">NULL</span>
         rows: <span style="color: #cc66cc;">9754</span>
        Extra: <span style="color: #993333; font-weight: bold;">USING</span> <span style="color: #993333; font-weight: bold;">WHERE</span>; <span style="color: #993333; font-weight: bold;">USING</span> index
*************************** <span style="color: #cc66cc;">2</span>. row ***************************
           id: <span style="color: #cc66cc;">2</span>
  select_type: DEPENDENT SUBQUERY
        table: B
         type: index
possible_keys: <span style="color: #aa3399; font-weight: bold;">NULL</span>
          key: PRIMARY
      key_len: <span style="color: #cc66cc;">178</span>
          ref: <span style="color: #aa3399; font-weight: bold;">NULL</span>
         rows: <span style="color: #cc66cc;">9753</span>
        Extra: <span style="color: #993333; font-weight: bold;">USING</span> <span style="color: #993333; font-weight: bold;">WHERE</span>; <span style="color: #993333; font-weight: bold;">USING</span> index</pre>
<p>Básicamente dice que si, que va a usar clave primaria para ambas partes y punto. ¡Qué sabiduría!.</p>
<p>Ok, pues vamos a comparar. Podía simplemente ejecutar la consulta y santas pascuas, pero como me apetece comparar también cual es el coste a realizar trabajo de la base de datos vía código, he hecho un pequeño script en ruby, usando ActiveRecord para manejar las conexiones a la base de datos de forma simple. El código entero lo pongo targzeado al final, ahora pongo aquí la parte que interesa:</p>
<pre class="ruby"><span style="color:#CC00FF; font-weight:bold;">Benchmark</span>.<span style="color:#9900CC;">bmbm</span><span style="color:#006600; font-weight:bold;">&#123;</span> |b|
   <span style="color:#008000; font-style:italic;"># uno! El brikindans!, digo consulta en MySQL &quot;normal&quot; con el NOT IN</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(1) Consulta en MySQL&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      execute_with <span style="color:#6666ff; font-weight:bold;">MySQL::A</span>, <span style="color:#ff3333; font-weight:bold;">:normal</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># La misma que en (1) pero con PostgreSQL</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(2) Consulta en PostgreSQL&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      execute_with <span style="color:#6666ff; font-weight:bold;">PostgreSQL::A</span>, <span style="color:#ff3333; font-weight:bold;">:normal</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># La misma que en (1) pero con SQLite3</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(3) Consulta en SQLite3&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      execute_with <span style="color:#6666ff; font-weight:bold;">Sqlite3::A</span>, <span style="color:#ff3333; font-weight:bold;">:normal</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># Consulta con MySQL pero esta vez usando LEFT JOIN</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(4) Consulta en MySQL (LEFT JOIN)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      execute_with <span style="color:#6666ff; font-weight:bold;">MySQL::A</span>, <span style="color:#ff3333; font-weight:bold;">:left_join</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># La misma que en (4) pero con PostgreSQL</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(5) Consulta en PostgreSQL (LEFT JOIN)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      execute_with <span style="color:#6666ff; font-weight:bold;">PostgreSQL::A</span>, <span style="color:#ff3333; font-weight:bold;">:left_join</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># La misma que en (4) pero con SQLite3</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(6) Consulta en SQLite3 (LEFT JOIN)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      execute_with <span style="color:#6666ff; font-weight:bold;">Sqlite3::A</span>, <span style="color:#ff3333; font-weight:bold;">:left_join</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># Hacemos el proceso en código de forma penosa, con un coste Ɵ(n^2)</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(7) Consulta en código (noob mode)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      as = <span style="color:#6666ff; font-weight:bold;">MySQL::A</span>.<span style="color:#9900CC;">find</span> <span style="color:#ff3333; font-weight:bold;">:all</span>
      bs = <span style="color:#6666ff; font-weight:bold;">MySQL::B</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
      as.<span style="color:#CC0066; font-weight:bold;">select</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| !bs.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>i.<span style="color:#9900CC;">otro_id</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>.<span style="color:#9900CC;">size</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># Hacemos el proceso en código pero de forma decente, restando conjuntos</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(8) Consulta en código (MySQL)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">MySQL::A</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span> -
       <span style="color:#6666ff; font-weight:bold;">MySQL::B</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">size</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># La misma que en (8) pero con PostgreSQL</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(9) Consulta en código (PostgreSQL)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">PostgreSQL::A</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span> -
       <span style="color:#6666ff; font-weight:bold;">PostgreSQL::B</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">size</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
   <span style="color:#008000; font-style:italic;"># La misma que en (8) pero con SQLite3</span>
   b.<span style="color:#9900CC;">report</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;(10) Consulta en código (SQLite3)&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">Sqlite3::A</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span> -
       <span style="color:#6666ff; font-weight:bold;">Sqlite3::B</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">map</span><span style="color:#006600; font-weight:bold;">&#123;</span>|i| i.<span style="color:#9900CC;">otro_id</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">size</span>
   <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre>
<p>He aquí los resultados en mi pc, con <em>MySQL 5.0.45</em>, <em>PostgreSQL 8.2.7</em> y <em>SQLite 3.4.2</em> (<strong>sin</strong> tunear ninguna, tal y cual vienen en Ubuntu 7.10) y unos 10k registros en cada tabla.</p>
<pre class="bash">$ ./mysqlVsPostgresqlVsSQLite3.rb
Rehearsal --------------------------------------------------------------------------
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en MySQL                    <span style="color: #000000;">0.020000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.020000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">54.567416</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en PostgreSQL               <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.100255</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en SQLite3                  <span style="color: #000000;">0.180000</span>   <span style="color: #000000;">0.030000</span>   <span style="color: #000000;">0.210000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.295534</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en MySQL <span style="color: #7a0874; font-weight: bold;">&#40;</span>LEFT JOIN<span style="color: #7a0874; font-weight: bold;">&#41;</span>        <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">54.656340</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en PostgreSQL <span style="color: #7a0874; font-weight: bold;">&#40;</span>LEFT JOIN<span style="color: #7a0874; font-weight: bold;">&#41;</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.080631</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en SQLite3 <span style="color: #7a0874; font-weight: bold;">&#40;</span>LEFT JOIN<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #000000;">47.980000</span>   <span style="color: #000000;">0.360000</span>  <span style="color: #000000;">48.340000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">54.249483</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>noob mode<span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #000000;">21.660000</span>   <span style="color: #000000;">0.200000</span>  <span style="color: #000000;">21.860000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">30.060858</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>MySQL<span style="color: #7a0874; font-weight: bold;">&#41;</span>           <span style="color: #000000;">0.520000</span>   <span style="color: #000000;">0.040000</span>   <span style="color: #000000;">0.560000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.696692</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">9</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>PostgreSQL<span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #000000;">0.960000</span>   <span style="color: #000000;">0.060000</span>   <span style="color: #000000;">1.020000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">1.203388</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">10</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>SQLite3<span style="color: #7a0874; font-weight: bold;">&#41;</span>        <span style="color: #000000;">3.410000</span>   <span style="color: #000000;">0.190000</span>   <span style="color: #000000;">3.600000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">4.141494</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
---------------------------------------------------------------- total: <span style="color: #000000;">75</span>.610000sec
&nbsp;
                                             user     system      total        real
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en MySQL                    <span style="color: #000000;">0.160000</span>   <span style="color: #000000;">0.010000</span>   <span style="color: #000000;">0.170000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.200753</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en PostgreSQL               <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.027388</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en SQLite3                  <span style="color: #000000;">0.140000</span>   <span style="color: #000000;">0.010000</span>   <span style="color: #000000;">0.150000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.148729</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en MySQL <span style="color: #7a0874; font-weight: bold;">&#40;</span>LEFT JOIN<span style="color: #7a0874; font-weight: bold;">&#41;</span>        <span style="color: #000000;">0.010000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.010000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.000826</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en PostgreSQL <span style="color: #7a0874; font-weight: bold;">&#40;</span>LEFT JOIN<span style="color: #7a0874; font-weight: bold;">&#41;</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span>   <span style="color: #000000;">0.000000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.025892</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en SQLite3 <span style="color: #7a0874; font-weight: bold;">&#40;</span>LEFT JOIN<span style="color: #7a0874; font-weight: bold;">&#41;</span>     <span style="color: #000000;">51.810000</span>   <span style="color: #000000;">0.370000</span>  <span style="color: #000000;">52.180000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">69.148641</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">7</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>noob mode<span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #000000;">21.340000</span>   <span style="color: #000000;">0.200000</span>  <span style="color: #000000;">21.540000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #000000;">24.971090</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">8</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>MySQL<span style="color: #7a0874; font-weight: bold;">&#41;</span>           <span style="color: #000000;">0.420000</span>   <span style="color: #000000;">0.010000</span>   <span style="color: #000000;">0.430000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">0.503471</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">9</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>PostgreSQL<span style="color: #7a0874; font-weight: bold;">&#41;</span>      <span style="color: #000000;">0.970000</span>   <span style="color: #000000;">0.070000</span>   <span style="color: #000000;">1.040000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">2.188352</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">10</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> Consulta en código <span style="color: #7a0874; font-weight: bold;">&#40;</span>SQLite3<span style="color: #7a0874; font-weight: bold;">&#41;</span>        <span style="color: #000000;">3.170000</span>   <span style="color: #000000;">0.120000</span>   <span style="color: #000000;">3.290000</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>  <span style="color: #000000;">3.581979</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></pre>
<p>Adicionalmente he hecho también la prueba usando <strong>Microsoft Access 2003</strong>, gracias a <a href="http://blog.behindlogic.com/2007/07/msaccess-for-rails-heres-your-rough.html">este connector</a> (que lo he usado para cargar todos los datos). No lo he incluido en las pruebas porque solo funciona bajo Windows, así que he ejecutado las consulta a mano. La primera de ellas le cuesta unos 200 seg aproximadamente mientras que el left join lo ejecuta casi al instante, no más de <strong>0.25 segundos</strong>.</p>
<p>Mirando entonces todos los resultados, podemos observar como a <em>MySQL</em> le cuesta dos veces más que la ineficiente consulta con código y 700 veces más que a <em>Postgre</em>. Curioso, oye. En la segunda pasada <em>MySQL</em> ha cacheado el resultado (pero si haces otras consultas y volvemos a hacer ésta, tardaría de nuevo su tiempo <em>"normal"</em>) y es bastante más rápido. </p>
<p>En resumen se podría decir que es totalmente <strong>inaceptable</strong> (al menos para esta simple consulta de dos tablas) usar:</p>
<ul>
<li>MySQL (en cualquier caso)</li>
<li>SQLite usando LEFT JOINs (pero funciona perfectamente con subconsulta)</li>
<li>MS Access usando subconsulta (pero funciona perfectamente con LEFT JOINs)</li>
<li>Hacer el trabajo en código de forma estúpida (es lo que tiene)</li>
</ul>
<p>Por lo tanto, según mi propia interpretación, diría que nos quedan solo tres opciones (si consideramos únicamente estas 4 opciones como base de datos a usar) :</p>
<ul>
<li>Usar PostgreSQL</li>
<li>Usar la base de datos <em>'X'</em> para un <em>X</em> <strong>distinto</strong> a <strong>MySQL</strong> y probar nuestras consultas para ver si le gustan o no al <acronym title="sistema gestor de base de datos">SGBD</acronym></li>
<li>Usar la base de datos 'X', para un X cualquiera, emplear consultas triviales y filtrar en código de forma decente. (opción poco viable para entornos reales cuando tengamos millones de registros y no solo 10 mil)</li>
</ul>
<p>Y hasta aquí todo, que cada uno saque sus propias conclusiones. No voy a decir que <em>MySQL</em> es una puta mierda, o que <em>PostgreSQL</em> suele ser más lento que el caballo del malo, a decir verdad lo que si que diré es que los benchmark siempre son muy limitados y comparan cosas en un ámbito restringido y controlado, por lo que no sirven para nada, así que no sé para qué narices he escrito todo esto, a decir verdad no sé ni para que estás leyéndolo, pero allá tú.</p>
<p>El <strong>código</strong>, los <em>dump</em> para postgre y mysql listos para ser cargados en sus respectivas bases de datos, la base de datos en access y la base de datos de sqlite3 los dejó <a href="http://bicosyes.com/code/MySQLvsPostgreSQLvsSQLite3vsMSAccess.tar.gz">en este fichero</a> por si quieres jugar un rato. Se requiere (aparte de las base de datos obviamente) <em>active record</em> y <em>composite primary keys</em> (ambos instalables como gemas, <em>gem install composite_primary_keys</em>, por ejemplo).</p>
<img src="http://bicosyes.com/?ak_action=api_record_view&id=620&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/benchmark-mysql-vs-postgresql-vs-ruby/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Abstracciones imperfectas</title>
		<link>http://bicosyes.com/abstracciones-imperfectas/</link>
		<comments>http://bicosyes.com/abstracciones-imperfectas/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 21:30:45 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Citas]]></category>
		<category><![CDATA[Desarrollo de software]]></category>

		<guid isPermaLink="false">http://bicosyes.com/abstracciones-imperfectas/</guid>
		<description><![CDATA[All non-trivial abstractions, to some degree, are leaky Joel Spolsky]]></description>
			<content:encoded><![CDATA[<p class="frase">All non-trivial abstractions, to some degree, are leaky</p>
<p class="author"><a href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html">Joel Spolsky</a></p>
<img src="http://bicosyes.com/?ak_action=api_record_view&id=617&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/abstracciones-imperfectas/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>El desarrollo de software es como&#8230;</title>
		<link>http://bicosyes.com/el-desarrollo-de-software-es-como/</link>
		<comments>http://bicosyes.com/el-desarrollo-de-software-es-como/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 14:43:23 +0000</pubDate>
		<dc:creator>blaxter</dc:creator>
				<category><![CDATA[Desarrollo de software]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://bicosyes.com/el-desarrollo-de-software-es-como/</guid>
		<description><![CDATA[¿Qué es el desarrollo de software? Es una ciencia (David Gries, 1981) Es un arte (Donald Knuth, 1998) Es un proceso (Watts Humphrey, 1989) Es como tener un coche, siempre tienes que arreglar cosas (P.J. Plauger, 1993) Es como conducir &#8230; <a href="http://bicosyes.com/el-desarrollo-de-software-es-como/">Sigue leyendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>¿Qué es el desarrollo de software?</p>
<ul>
<li>Es una <strong>ciencia</strong> (<a href="http://en.wikipedia.org/wiki/David_Gries">David Gries</a>, 1981)</li>
<li>Es un <strong>arte</strong> (<a href="http://es.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</a>, 1998)</li>
<li>Es un proceso (<a href="http://en.wikipedia.org/wiki/Watts_Humphrey">Watts Humphrey</a>, 1989)</li>
<li>Es como tener un coche, siempre tienes que arreglar cosas (<a href="http://en.wikipedia.org/wiki/P.J._Plauger">P.J. Plauger</a>, 1993)</li>
<li>Es como <strong>conducir</strong> un coche, siempre tienes que ir haciendo pequeñas correcciones (<a href="http://en.wikipedia.org/wiki/Kent_Beck">Kent Beck</a>, 2000)</li>
<li>Es un juego (<a href="http://en.wikipedia.org/wiki/Alistair_Cockburn">Alistair Cockburn</a>, 2002)</li>
<li>Es como un bazar (<a href="http://es.wikipedia.org/wiki/Eric_S._Raymond">Eric Raymond</a>, 2000)</li>
<li>Es como la <strong>jardinería</strong> (<a href="http://en.wikipedia.org/wiki/Dave_Thomas_%28programmer%29">Dave Thomas</a> & <a href="http://en.wikipedia.org/wiki/Andy_Hunt_%28author%29">Andy Hunt</a>, 1999)</li>
<li>Es como rodar Blancanieves y los siete enanitos (Paul Heckel, 1994)</li>
<li>Es como <strong>cazar</strong> hombres lobo o ahogarse con dinosaurios en una hoyo de alquitrán (<a href="http://es.wikipedia.org/wiki/Frederick_Brooks">Fred Brooks</a>, 1995)
<li>Es como construir un edificio (la mitad de la industria, 19xx)</li>
</ul>
<p>Posiblemente muchos tengan parte de razón, aunque con la última comparación es con la que estoy totalmente en desacuerdo. Si tuviese que quedarme con una, escogería la de la <strong>jardinería</strong>. Queda muy cursi, pero es la realidad. </p>
<p>En definitiva, diría que el desarrollo de software es como crear/cuidar un jardín atestado de fauna (incluidos hombres lobo y dinosaurios) que evoluciona según las leyes darwinianas a un ritmo diez millones más rápido del normal (menos los dinosaurios, que están en huelga) y el cual es visitado por turistas españoles que les gusta crear hogueras y practicar sexo al aire libre, a la holandesa. </p>
<img src="http://bicosyes.com/?ak_action=api_record_view&id=608&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://bicosyes.com/el-desarrollo-de-software-es-como/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

