Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > Database
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-02-2007, 6:09 PM   #1
Thuman
 
Thuman's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Slow update - ON DUPLICATE KEY UPDATE

Hello,

I have an INSERT query that uses the ON DUPLICATE KEY UPDATE clause.
The problem is that while inserts are done instantly, updates take up
to 5-10 minutes before taking effect!

Version: MySQL 5.0.37-LOG (Hosted server, so update not possible)
Table: InnoDB, currently sized at 138 rows/ 32kb.

Query Sample:
INSERT INTO armory_ranking
(character_hash,character_name,character_gamelevel ,character_region,character_realm,character_race,c haracter_class,character_faction,character_guild,c haracter_build,character_level,character_average)
values ('Bollebob-EU-
Magtheridon','Bollebob','70','EU','Magtheridon','U ndead','Rogue','Horde','Nihilum','','2292','134.82 ')
ON DUPLICATE KEY UPDATE character_level = '2292', character_average =
'134.82',character_guild = 'Nihilum',character_class = 'Rogue'

It's all very strange to me, I've heard people saying that this is
caused by write locks, but is there any way to speed these up?

Regards.
Brian

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-02-2007, 6:09 PM   #2
Captain Paralytic
 
Captain Paralytic's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Slow update - ON DUPLICATE KEY UPDATE

On 2 Jul, 10:39, Thuman <bri...@thumann.dk> wrote:
> Hello,
>
> I have an INSERT query that uses the ON DUPLICATE KEY UPDATE clause.
> The problem is that while inserts are done instantly, updates take up
> to 5-10 minutes before taking effect!
>
> Version: MySQL 5.0.37-LOG (Hosted server, so update not possible)
> Table: InnoDB, currently sized at 138 rows/ 32kb.
>
> Query Sample:
> INSERT INTO armory_ranking
> (character_hash,character_name,character_gamelevel ,character_region,charact*er_realm,character_race, character_class,character_faction,character_guild, c*haracter_build,character_level,character_average )
> values ('Bollebob-EU-
> Magtheridon','Bollebob','70','EU','Magtheridon','U ndead','Rogue','Horde','N*ihilum','','2292','134.8 2')
> ON DUPLICATE KEY UPDATE character_level = '2292', character_average =
> '134.82',character_guild = 'Nihilum',character_class = 'Rogue'
>
> It's all very strange to me, I've heard people saying that this is
> caused by write locks, but is there any way to speed these up?
>
> Regards.
> Brian


I have to say that I've never come across this problem, but here's a
hint to make the construction of the query a bit easier. Use the
VALUES() function to save having to code the literals twice thus:

INSERT INTO armory_ranking
(character_hash,character_name,character_gamelevel ,character_region,charact*
er_realm,character_race,character_class,character_ faction,character_guild,c*
haracter_build,character_level,character_average)
values ('Bollebob-EU-
Magtheridon','Bollebob','70','EU','Magtheridon','U ndead','Rogue','Horde','N*
ihilum','','2292','134.82')
ON DUPLICATE KEY UPDATE
character_level = VALUES(character_level),
character_average = VALUES(character_average),
character_guild = VALUES(character_guild),
character_class = VALUES(character_class)


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql UPDATE problem with duplicate rows Jon Maz Database 7 07-01-2007 8:34 PM
PHP update David Quinton PHP 0 07-01-2007 2:58 PM
Live Slow after May 360 Update TheMachineRNC Console Subjects 2 06-26-2007 2:26 AM
Update replication dbs, force update? George A. Database 0 06-25-2007 11:09 PM
Update ulexander@gmail.com Google questions 0 05-28-2007 12:45 AM


Featured Websites




All times are GMT +1. The time now is 12:36 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98