If you have an index over the primary key of your table (it likely works for other columns as well) then a SELECT COUNT(*) will simply look into that index, so the DB already does the optimization you're looking for.
I'd only revert to such means if I ran into performance problems that make them absolutely necessary.
In reply to Re: Database or Storable?
by moritz
in thread Database or Storable?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |