List:General Discussion« Previous MessageNext Message »
From:Jigal van Hemert Date:April 28 2005 7:26am
Subject:Re: Get a Random Row on a HUGE db
View as plain text  
From: "Scott Gifford"

>    SELECT COUNT(*) FROM firebase_content;
>
> to get the count.  That's very fast; it comes from the table summary
> information, IIRC.  I use a similar solution for a similar problem,
> and have had great luck with it.
This is true for MyISAM tables, but e.g. InnoDB does *not* store the total
number of records per table seperately. A SELECT COUNT(*) on InnoDB will
result in a real row count...

Regards, Jigal.

Thread
Get a Random Row on a HUGE dbgunmuse26 Apr
  • Re: Get a Random Row on a HUGE dbRhino26 Apr
  • Re: Get a Random Row on a HUGE dbDawid Kuroczko27 Apr
RE: Get a Random Row on a HUGE dbJay Blanchard26 Apr
  • RE: Get a Random Row on a HUGE dbgunmuse26 Apr
    • Re: Get a Random Row on a HUGE dbPeter Brawley26 Apr
      • RE: Get a Random Row on a HUGE dbgunmuse26 Apr
      • RE: Get a Random Row on a HUGE dbgunmuse26 Apr
        • Re: Get a Random Row on a HUGE dbGary Richardson27 Apr
    • Re: Get a Random Row on a HUGE dbChristian Meisinger27 Apr
    • Re: Get a Random Row on a HUGE dbScott Gifford27 Apr
    • Re: Get a Random Row on a HUGE dbJigal van Hemert28 Apr