We have 2 web servers load balanced connecting to the master SQL server via a private network. Recently, some of the stats in AdminCP seem to be a bit off so we did some investigating and found that the post counts seemed to be inconsistent between the two servers. Since that's a MySQL query, I dug into the database and found that it seemed to be fluctuating there as well. Can someone please confirm that this is the correct way to see the number of posts since midnight (effectively showing the number of new posts today):
select count(*) as count FROM post where dateline >= (UNIX_TIMESTAMP() - TIME_TO_SEC(NOW()));
And if that is correct, why would it report erratic numbers (in some cases, decreasing the count when I can confirm that no posts were deleted) and why would the numbers seem to be different between 2 frontend web servers (which theoretically are just getting this number by a MySQL select statement and shouldn't be server or platform dependent)?