With the query rewrite framework in the latest MySQL (Optimizer/InnoDB/Replication) labs release, you get the opportunity to author plugins that can rewrite queries. You can choose whether to rewrite the queries beforeÂ and/or after parsing. Today I am going toÂ walk you through how to write a pre-parse query rewrite plugin.
When would you want to use a pre-parse query rewrite plugin? The greatest benefit compared toÂ post-parse rewrites — which I will cover in a separate post —Â isÂ the efficiency, especially the lack of overhead for those queries that are …[Read more...]