mysql - Multiple Where clause with decryption -


would query decrypt usernames each condition or once , apply each condition?

select *  tablea  (     concat_ws(         ' ',          aes_decrypt(tablea.firstname, "fnkey"),          aes_decrypt(tablea.lastname, "lnkey")     ) '%ray%'      or      concat_ws(         ' ',          aes_decrypt(tablea.lastname, "lnkey"),          aes_decrypt(tablea.firstname, "fnkey")     ) '%ray%' ); 

i cannot tell if function evaluated once each row or more. depends on query optimizer. establish benchmark.

anyway, query inefficient. full table scan , calculate function each row. cannot use index here. not implement query on table more couple of rows.


Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

java - Jtable duplicate Rows -

java - Run a .jar on Heroku -