开发者

If I use a mysql function in a where clause that returns a static value does it get re-evaluated every row?

开发者 https://www.devze.com 2022-12-22 22:44 出处:网络
For example, select * from x where crc=CRC32(\'Hi\') does the CRC32 function get run every row it checks? If so how could 开发者_开发知识库I optimize it?if you didn\'t pass row values as arguments i

For example,

select * from x where crc=CRC32('Hi')

does the CRC32 function get run every row it checks? If so how could 开发者_开发知识库I optimize it?


if you didn't pass row values as arguments it will be evaluated once.

except for this case:

SELECT column FROM table
ORDER BY RAND()
LIMIT 1

selecting random row

0

精彩评论

暂无评论...
验证码 换一张
取 消