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

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

python - Received unregistered task using Celery with Django -

Line ending issue with Mercurial or Visual Studio -