<?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>Loogaroo : Lamp / web 2.0 / Ajax ... &#187; Non classé</title>
	<atom:link href="http://loogaroo.net/category/non-classe/feed/" rel="self" type="application/rss+xml" />
	<link>http://loogaroo.net</link>
	<description></description>
	<lastBuildDate>Tue, 14 Jul 2009 17:48:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subselect en MySQL attention !</title>
		<link>http://loogaroo.net/2007/09/29/subselect-en-mysql-attention/</link>
		<comments>http://loogaroo.net/2007/09/29/subselect-en-mysql-attention/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 17:22:19 +0000</pubDate>
		<dc:creator>Manu</dc:creator>
				<category><![CDATA[Non classé]]></category>

		<guid isPermaLink="false">http://loogaroo.net/2007/09/29/subselect-en-mysql-attention/</guid>
		<description><![CDATA[Je suis un utilisateur de MySQL depuis quelques années déjà&#8230; et donc j&#8217;ai pris l&#8217;habitude de feinter certaines fonctionnalités. Par exemple, le Subselect apparu dans la version 4.1. Je profite donc de cet article pour vous dire de faire attention car un subselect c&#8217;est peut être plus facile a développer mais on peut faire mieux [...]]]></description>
			<content:encoded><![CDATA[<p>Je suis un utilisateur de MySQL depuis quelques années déjà&#8230; et donc j&#8217;ai pris l&#8217;habitude de feinter certaines fonctionnalités. Par exemple, le Subselect apparu dans la version 4.1. Je profite donc de cet article pour vous dire de faire attention car un subselect c&#8217;est peut être plus facile a développer mais on peut faire mieux en terme de performance.</p>
<p>Sur <a href="http://www.wanarun.net">Wanarun</a> (je préfère prendre des exemples que je connais), je veux voir le nombre de personnes qui utilise la gestion des départs.</p>
<p>La version avec subselect :</p>
<div style="overflow: auto; width: 450px;padding-bottom: 15px;"><div class="mysql" style="color: #000066; border-left: 5px solid rgb(195, 215, 234); background-color: rgb(240, 240, 240); padding:1px;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span> pseudo <span style="color: #993333; font-weight: bold;">FROM</span> fr_users <span style="color: #993333; font-weight: bold;">WHERE</span> userID <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> userID <span style="color: #993333; font-weight: bold;">FROM</span> mes_departs<span style="color: #66cc66;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></div></div>
<p>temps :  0.08 sec</p>
<p>la version avec juste une jointure</p>
<div style="overflow: auto; width: 450px;padding-bottom: 15px;"><div class="mysql" style="color: #000066; border-left: 5px solid rgb(195, 215, 234); background-color: rgb(240, 240, 240); padding:1px;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">DISTINCT</span><span style="color: #66cc66;">&#40;</span>pseudo<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> mes_departs m,fr_users u <span style="color: #993333; font-weight: bold;">WHERE</span> u.userID=m.userID;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;font: normal normal 8pt 'Courier New', Courier, monospace; color: #003030;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></div></div>
<p>temps : 0.00 sec</p>
<p>Donc faites bien attention ! De plus, la version avec sub select risque d&#8217;etre de plus en plus lente si la taille de votre base augmente.</p>

<div class="sociable">
<span class="sociable_tagline">
<strong>Partager et découvrir :</strong>
	<span>Ces icônes sont des liens vers des sites de partage de signet sociaux où les lecteurs peuvent partager et découvrir de nouveaux liens.</span>
</span>
<ul>
	<li><a rel="nofollow" target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;title=Subselect%20en%20MySQL%20attention%20%21" title="bodytext"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/digg.png" title="bodytext" alt="bodytext" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://del.icio.us/post?url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;title=Subselect%20en%20MySQL%20attention%20%21" title="del.icio.us"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.netvouz.com/action/submitBookmark?url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;title=Subselect%20en%20MySQL%20attention%20%21&amp;popup=no" title="Netvouz"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/netvouz.png" title="Netvouz" alt="Netvouz" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;title=Subselect%20en%20MySQL%20attention%20%21" title="description"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/dzone.png" title="description" alt="description" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.thisnext.com/pick/new/submit/sociable/?url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;name=Subselect%20en%20MySQL%20attention%20%21" title="ThisNext"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/thisnext.png" title="ThisNext" alt="ThisNext" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;bm_description=Subselect%20en%20MySQL%20attention%20%21&amp;plugin=soc" title="MisterWong"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/misterwong.gif" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://wists.com/s.php?c=&amp;r=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;title=Subselect%20en%20MySQL%20attention%20%21" title="Wists"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/wists.png" title="Wists" alt="Wists" class="sociable-hovers sociable_wists" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.scoopeo.com/scoop/new?newurl=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F&amp;title=Subselect%20en%20MySQL%20attention%20%21" title="Scoopeo"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/scoopeo.png" title="Scoopeo" alt="Scoopeo" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F" title="Technorati"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" target="_blank" href="http://www.wikio.com/vote?url=http%3A%2F%2Floogaroo.net%2F2007%2F09%2F29%2Fsubselect-en-mysql-attention%2F" title="Wikio"><img src="http://loogaroo.net/wp-content/plugins/sociable/images/wikio.gif" title="Wikio" alt="Wikio" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://loogaroo.net/2007/09/29/subselect-en-mysql-attention/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
