Re: Optimizing WHERE computations
Run an EXPLAIN SELECT * FROM news
WHERE time > SUBDATE(NOW(), INTERVAL 1 DAY);
If you have an index on the time column, MySQL should be able to use it in this SELECT statement, since the SUBDATE(...) will evaluates to a constant.
Subject
Views
Written By
Posted
2246
May 30, 2005 11:48AM
Re: Optimizing WHERE computations
1560
May 30, 2005 06:52PM
1725
May 31, 2005 04:52AM
1579
May 31, 2005 05:35AM
1594
May 31, 2005 07:08AM
1189
May 31, 2005 07:11AM
1681
May 31, 2005 10:45AM
1862
May 31, 2005 07:19PM
1674
June 01, 2005 08:53AM
1626
June 02, 2005 06:41PM
1699
June 02, 2005 09:20PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.