Yelp / doloop

Task loop for keeping things updated
Other
10 stars 10 forks source link

add total to stats() #7

Closed coyotemarin closed 13 years ago

coyotemarin commented 13 years ago

So, in practice, when you call stats(), it's pretty common to want to know the total number of rows. We should probably have a total stat even though it's redundant.

To save time and confusion, maybe we shouldn't SELECT COUNT(*), and instead just take the sum of bumped, locked, new, and updated.

coyotemarin commented 13 years ago

I'm leaning towards using count(*) for total, and calculating updated from the other parts of the table (since this should be the majority of rows in most cases).

coyotemarin commented 13 years ago

Oh, though in some edge cases that would lead to a negative value for updated.

Maybe best to leave well enough alone?

coyotemarin commented 13 years ago

This is done in development.