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 -

python - Received unregistered task using Celery with Django -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -