2 ms·
There are downsides to anything ascending/descending in a database too... They mess with table statistics. If you do a query like "SELECT * from users where
by londons_explore 3y ago
There are downsides to anything ascending/descending in a database too...
They mess with table statistics. If you do a query like "SELECT * from users where creation_date > NOW-1h", the query analyzer doesn't know that there might be thousands of users created in the last hour. It is probably working from day-old statistics that say all users have a creation_date between 2008 and 2023-06-21.
That makes it sometimes pick an exceptionally poor query plan. Ie. instead of your query taking 50 milliseconds, it might take 50 hours and involve an n^2 scan of all data in your database.