> But what if concurrent inserts are happening to the table while the
> users page-view thru the data. The count may change.
True, in my situation that is not a big concern. In yours it may. You can
either expire the cached value every so often or run two queries on each
hit.
If you're expectin
]
Subject: RE: getting a page of data and total count
> What is the best way to get the total count as well as the paged
> content. Do I need to fire two queries or is there a trick which can
do
> this in a single query?
I'm doing this on tables with many millions of records. I take a h
> What is the best way to get the total count as well as the paged
> content. Do I need to fire two queries or is there a trick which can do
> this in a single query?
I'm doing this on tables with many millions of records. I take a hit once
to get a total record count then cache that value in the