Aikesheng Open Source Community
Dec 19, 2023 · Databases
Why sysdate() Cannot Use Indexes While now() Can in MySQL
The article explains that MySQL's sysdate() returns the exact execution time of a statement, making it non‑deterministic and preventing index usage, whereas now() returns a constant timestamp at statement start, allowing the optimizer to treat it as a constant and use indexes effectively.
NOWSQLmysql
0 likes · 10 min read
