Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It depends on context, for example this is true for SQL server if you have a filtered index based on datetime.

If you use a constant or set a @variable ahead of time, it will use the filtered index, but if you just use =now() equivalent

(or in SQL server GETDATE()) it will not. (You may also need to use OPTION(Recompile))



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: