refreshing a mysql index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pedalpete
    New Member
    • Oct 2007
    • 109

    refreshing a mysql index

    fairly new to mysql, and i've been searching online but haven't found anything.

    i've got an index of a few values in my table, and I did a bulk
    Code:
     
    UPDATE number SET accuracy = '0' WHERE accuracy = '3'
    mysql returned that 211,000 rows where updated,
    but doing a query of
    Code:
    SELECT COUNT(*) FROM number WHERE accuracy = '0'
    returns 21,000 rows
    while
    Code:
    SELECT COUNT(*) FROM number WHERE accuracy = '3'
    returns 119,000 rows.

    do i need to somehow refresh the index? I'm not sure why these changes are not showing up.
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    I'm not sure what may be causing this. The only reason I know that would cause update delays is if you are using the LOW_PRIORITY keyword, but I don't see how
    that would affect your query.

    Are you using transactions?
    Did you perhaps forget to commit the current transaction?
    You messing around with the Rollback command? :P

    Have you tried running your update query again?
    If the change did indeed happen it should return 0 rows affected.

    Comment

    Working...