Home » Performance » MySQL » update field with ranking
update field with ranking [message #980] Sat, 24 March 2007 08:06 Go to previous message
carpii  is currently offline carpii
Messages: 48
Registered: November 2006
Member
Hi, is there an efficient way to update a table with the rank of that row, given a specific order by

lets say i have

Table: users
userid int
score int
rank int

select * from users order by score DESC

I want to update the rank field, to the corresponding row number in the above query

Thanks

Read Message
Read Message
Read Message
Previous Topic:ORDER BY slowing down query
Next Topic:Key Cache Behaviour
Goto Forum:

  


Current Time: Sun Jul 5 22:03:54 EDT 2009

Total time taken to generate the page: 0.00490 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.