SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL_CALC_FOUND_ROWS slow on large tables?

    Someone mentioned that SQL_CALC_FOUND_ROWS is slow on large tables (over 400,000 recoreds and it's better to use 2 queries, plus the output of SQL_CALC_FOUND_ROWS is unpredictable. Is that true? What are your professional opinions?

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    SQL_CALC_FOUND_ROWS is not unpredictable. if someone thinks it is, then they don't understand how to use it.

    the performance of COUNT(*) and SQL_CALC_FOUND_ROWS should be nearly identical.

    if "Someone" has a practical use case where it isn't then i'd like to see it.
    Check out our new Industry News forum!
    Keep up-to-date with the latest SP news in the Community Crier

    I edit the SitePoint Podcast


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •