MySQL Forums
Forum List  »  Performance

Index update with update statement
Posted by: Kapil Narula
Date: September 10, 2007 10:30PM

Hi,

I have the following question regarding index updates.

Suppose I have a users table with the following columns:
user_id (primary key)
username (index is created on this column)
name (there is no index on this column)

Assume that the row with user_id=10 has the following values:
user_id=10, username="guru", name="Chandan Rastogi"

Now I issue an update statement as follows:

UPDATE users
SET name="Abhinav Gupta", username="guru"
WHERE user_id=10

As you can see the value of username is the same as it was before the update statement.

Will the index on the username column be updated because of this update statement.

I would be grateful if you can let me know a tool using which I can get to know what all indexes are updated when an update statement is issued.

Also let me know if there exists a document that provides an answer to the problem that I have described above.

Thanks
Kapil

Options: ReplyQuote


Subject
Views
Written By
Posted
Index update with update statement
4372
September 10, 2007 10:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.