<?xml version="1.0" encoding="windows-1252"?>
<node id="992787" title="Re^3: s/Perl/SQL/ ?" created="2012-09-10 11:47:51" updated="2012-09-10 11:47:51">
<type id="11">
note</type>
<author id="533863">
roboticus</author>
<data>
<field name="doctext">
&lt;p&gt;[Freezer]:&lt;/p&gt;
&lt;p&gt;I used commonly-used&lt;sup&gt;&amp;#91;1&amp;#93;&lt;/sup&gt; SQL constructs, so&lt;sup&gt;&amp;#91;2&amp;#93;&lt;/sup&gt; it should be just fine.  I used MySQL about 10 years ago, and I seem to recall that it was fairly standard SQL, so I would expect it to work.  (Most of the things I remember as lacking (such as nested queries) were added to MySQL years ago.)&lt;/p&gt;
&lt;p&gt;I only mentioned Oracle to let you know that I'm not current on MySQL and that you *might* need to tweak it.&lt;/p&gt;
&lt;p&gt;However, as [Corion] mentioned in his initial response, there's no substitute for using indexes, benchmarking and any statement analysis feedback your database offers.  After all, how the database decides to execute your SQL statement may be markedly different than what you might imagine.  For example, I *expect* that the comparison / length / substring may be faster than like.  But I have no idea what MySQL's opinion may turn out to be.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; Updated in response to AM's reply.  Thanks!  &amp;#91;1&amp;#93; I changed "standard SQL" to "commonly-used SQL", and &amp;#91;2&amp;#93; removed "if MySQL uses standard SQL".&lt;/p&gt;
&lt;p&gt;...[roboticus]&lt;/p&gt;
&lt;p&gt;&lt;i&gt;When your only tool is a hammer, all problems look like your thumb.&lt;/i&gt;&lt;/p&gt;</field>
<field name="root_node">
992760</field>
<field name="parent_node">
992773</field>
</data>
</node>
