As I consult the oracle 9i  reference , I found they actualy
 have values of  'similar' and 'force' to be set for cursor_shareing parameter, 
which allows
 oracle to treat hard-coded statements to bind-variable statements in order to 
use
 the same execution plans. I wonder how they do this?...>_<///
  

 

 ------------------ ???????? ------------------
  ??????: "Johan De Meersman"<vegiv...@tuxera.be>;
 ????????: 2012??8??13??(??????) ????8:48
 ??????: "MID.night"<693893...@qq.com>; 
 ????: "673575760"<673575...@qq.com>; "mysql"<mysql@lists.mysql.com>; 
 ????: Re: Hi, how did u do de-emphasis of sql statements?

 



----- Original Message -----
> From: "MID.night" <693893...@qq.com>
> 
> Like select * from table where name>??A?? is just
>  
> The same as select * from table where name>??B??.

The execution plan for both statements is indeed likely (but not guaranteed!) 
to be the same. As far as I'm aware, though, MySQL does not bother about that, 
though, as there is no execution plan cache.

The query result cache does not equate the statements - it works based off the 
EXACT query text, INCLUDING spaces and capitalization.

When analyzing various logs, the Maatkit/Aspersa/Percona toolset does transform 
SQL statements into their canonical form, though; so if you're looking for ways 
to do that you can have a look at how it's done there.


-- 
Linux Bier Wanderung 2012, now also available in Belgium!
August, 12 to 19, Diksmuide, Belgium - http://lbw2012.tuxera.be

Reply via email to