MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Adam Erickson Date:January 14 2003 9:50pm
Subject:RE: getting a page of data and total count
View as plain text  
> 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 expecting even nominal use of these pages the two-query option
isn't as bad as it sounds.  Remember that your OS with cache the disk
access.  The first time it may be slow but subsequent requests will be
faster.


Thread
getting a page of data and total countVikash K Agarwal14 Jan
  • RE: getting a page of data and total countAdam Erickson14 Jan
    • RE: getting a page of data and total countVikash K Agarwal14 Jan
      • RE: getting a page of data and total countAdam Erickson14 Jan