Crusader Posted October 31, 2008 Share Posted October 31, 2008 Would using an "UPDATE LOW_PRIORITY" have any negative effects on a game? I'm storing user positions in the database and updating their row whenever they move to a different area (which would be a lot). UPDATE LOW_PRIORITY `players` SET `sector` = ?, `galaxy` = ?, `x` = ?, `y` = ? WHERE `game` = ? AND `player_id` = ? LIMIT 1 Before calling that statement this is initially run at the start of every page. SELECT * FROM `players` WHERE `user_id` = ? AND `game` = ? LIMIT 1 Would this result in nobody being able to move until someone else has completed theirs? I don't want that to happen and am not sure how to test this. ??? Note: I believe table locking is set to off on mysqld. Link to comment https://forums.phpfreaks.com/topic/130826-solved-gaming-and-update-low_priority/ Share on other sites More sharing options...
fenway Posted October 31, 2008 Share Posted October 31, 2008 Well, have you read the refman page on LOW_PRIORITY/ Link to comment https://forums.phpfreaks.com/topic/130826-solved-gaming-and-update-low_priority/#findComment-679433 Share on other sites More sharing options...
Crusader Posted October 31, 2008 Author Share Posted October 31, 2008 Well that's where I learned about LOW_PRIORITY but it wasn't quite clear to me whether or not it would leave users in limbo until everyone else had finished moving/updating. Link to comment https://forums.phpfreaks.com/topic/130826-solved-gaming-and-update-low_priority/#findComment-679705 Share on other sites More sharing options...
fenway Posted November 3, 2008 Share Posted November 3, 2008 It's only "low" when compared to SELECT statements. Link to comment https://forums.phpfreaks.com/topic/130826-solved-gaming-and-update-low_priority/#findComment-681424 Share on other sites More sharing options...
Crusader Posted November 5, 2008 Author Share Posted November 5, 2008 Thanks! Link to comment https://forums.phpfreaks.com/topic/130826-solved-gaming-and-update-low_priority/#findComment-682726 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.