Page 2 of 2 First 12
  • Jump to page:
    #16
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,653
    Rep Power
    171
    Hello;

    Rudy would you please tell us what is the conclusion? Do I really have to deal with this 5 seconds delay? That wouldn't be acceptable.

    Thank you
  2. #17
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,145
    Rep Power
    4274
    Originally Posted by zxcvbnm
    Rudy would you please tell us what is the conclusion? Do I really have to deal with this 5 seconds delay? That wouldn't be acceptable.
    yes, if it's an innodb table, you must allow the system time to count the rows

    luckily it can use an index for that

    if you want instant response, you may change your table to myisam, but that brings with it many other considerations
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #18
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,653
    Rep Power
    171
    Oh! That's not good.
    What would be your decision if you are in this situation?
  6. #19
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,145
    Rep Power
    4274
    Originally Posted by zxcvbnm
    What would be your decision if you are in this situation?
    i would reassess why i thought i wanted an accurate count
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  8. #20
  9. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,653
    Rep Power
    171
    Originally Posted by r937
    i would reassess why i thought i wanted an accurate count
    Brilliant!
  10. #21
  11. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,653
    Rep Power
    171
    Originally Posted by r937
    i would reassess why i thought i wanted an accurate count
    Ummm, estimate row count is ridiculous! This is the results for the same query:
    Code:
    SELECT *
    FROM `products_table`
    LIMIT 0 , 30
    Showing rows 0 - 29 (~7,830,9091 total, Query took 0.0006 sec)
    howing rows 0 - 29 (~5,006,1911 total, Query took 0.0006 sec)
    Showing rows 0 - 29 (~4,052,7541 total, Query took 0.0006 sec)
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo