Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 04:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



can anyone give me tip how to delete all items etc.. if character is deleted

Discussion on can anyone give me tip how to delete all items etc.. if character is deleted within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
marcbacor6666's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 557
Received Thanks: 76
can anyone give me tip how to delete all items etc.. if character is deleted

can anyone give me tip how to delete all items, skill, prof, itemadd etc.. if character is deleted?
marcbacor6666 is offline  
Old 10/26/2019, 23:42   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by marcbacor6666 View Post
can anyone give me tip how to delete all items, skill, prof, itemadd etc.. if character is deleted?
You can have triggers in MySQL which auto-delete related records using foreign keys. Or, you can just issue the deletes programmatically after calling character delete for each table you need to clean up. I'm assuming you're using MySQL because this question would be super weird otherwise.
Spirited is offline  
Old 10/26/2019, 23:44   #3
 
elite*gold: 0
Join Date: Mar 2014
Posts: 37
Received Thanks: 7
1#
make list with the UIDs in the entity and load the items if the item for contains uid it's okay else delete it
2#
at the part of deleting the character before the shutdown make the UID = 0 for the items he have and then delete everything with UID = 0
Ahmed El5WaGa is offline  
Old 10/27/2019, 01:04   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by Ahmed El5WaGa View Post
1#
make list with the UIDs in the entity and load the items if the item for contains uid it's okay else delete it
2#
at the part of deleting the character before the shutdown make the UID = 0 for the items he have and then delete everything with UID = 0
What on Earth are you talking about? You don't need a select, then an update, then a delete for every single item. That's so much more expensive than just deleting in bulk as a single operation per table. What's your reasoning for that? I don't understand why you did that.
Spirited is offline  
Thanks
1 User
Old 10/27/2019, 05:53   #5
 
elite*gold: 0
Join Date: Sep 2016
Posts: 25
Received Thanks: 6
Quote:
Originally Posted by Spirited View Post
What on Earth are you talking about? You don't need a select, then an update, then a delete for every single item. That's so much more expensive than just deleting in bulk as a single operation per table. What's your reasoning for that? I don't understand why you did that.
i'm not sure either
but probably there's something behind the scenes, and i feel it's incredible reason
felixanius is offline  
Old 10/27/2019, 06:25   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by felixanius View Post
i'm not sure either
but probably there's something behind the scenes, and i feel it's incredible reason
I work in the game industry doing planet scale game services, and this doesn't make sense to me. We don't do this; I've never done this; no company I've ever worked for has ever done this unless there are foreign key violations... in which case you have worse problems to deal with. So no, I don't think there's any "incredible reason" for doing this, unless it's "incredibly sloppy".
Spirited is offline  
Old 10/27/2019, 10:10   #7
 
elite*gold: 0
Join Date: Mar 2014
Posts: 37
Received Thanks: 7
Quote:
Originally Posted by Spirited View Post
What on Earth are you talking about? You don't need a select, then an update, then a delete for every single item. That's so much more expensive than just deleting in bulk as a single operation per table. What's your reasoning for that? I don't understand why you did that.
when the delete the character set the UID at items table to 0
and when loading it next time if the UID = 0 then delete it.
Ahmed El5WaGa is offline  
Old 10/27/2019, 11:18   #8
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by Ahmed El5WaGa View Post
when the delete the character set the UID at items table to 0
and when loading it next time if the UID = 0 then delete it.
I got what you said, but why are you saying this person should do all this just to delete items. I feel like you're setting up a Rube Goldburg machine for deleting characters. If you're concerned about adjusting indexes on delete (which you shouldn't be given the extremely small size and hopefully the caches you have in place for frequent reads/writes which this table shouldn't have), just partition your table correctly or bulk delete in batches. This is such a bizarre and ineffective way to try and "scrape" performance.
Spirited is offline  
Old 10/27/2019, 11:41   #9
 
elite*gold: 0
Join Date: Mar 2014
Posts: 37
Received Thanks: 7
Quote:
Originally Posted by Spirited View Post
I got what you said, but why are you saying this person should do all this just to delete items. I feel like you're setting up a Rube Goldburg machine for deleting characters. If you're concerned about adjusting indexes on delete (which you shouldn't be given the extremely small size and hopefully the caches you have in place for frequent reads/writes which this table shouldn't have), just partition your table correctly or bulk delete in batches. This is such a bizarre and ineffective way to try and "scrape" performance.
i don't know i think that's the first thing i got in my mind ..
anyway of course you know better than me..
Ahmed El5WaGa is offline  
Old 10/27/2019, 12:03   #10
 
elite*gold: 0
Join Date: Oct 2019
Posts: 7
Received Thanks: 2
Hmmmm interesting af.
territorya99 is offline  
Old 10/28/2019, 03:22   #11
 
marcbacor6666's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 557
Received Thanks: 76
thank you so much for replying to my post.
marcbacor6666 is offline  
Old 10/29/2019, 02:20   #12
 
elite*gold: 0
Join Date: Sep 2016
Posts: 25
Received Thanks: 6
Quote:
Originally Posted by Spirited View Post
I work in the game industry doing planet scale game services, and this doesn't make sense to me. We don't do this; I've never done this; no company I've ever worked for has ever done this unless there are foreign key violations... in which case you have worse problems to deal with. So no, I don't think there's any "incredible reason" for doing this, unless it's "incredibly sloppy".
it was a joke and that why i called it incredible reason
something like carrying coals to Newcastle lol
felixanius is offline  
Thanks
1 User
Old 10/29/2019, 02:42   #13
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by felixanius View Post
it was a joke and that why i called it incredible reason
something like carrying coals to Newcastle lol
Ah, sorry. I'm incredibly dense with social cues. Hahaha
Spirited is offline  
Reply


Similar Threads Similar Threads
!!! TIP - AVOIDING SCAMMERS !!! - TIP *email bug
01/02/2013 - DarkOrbit - 31 Replies
#closerequest not making it public Reason : after reading what u guys have posted and the received pm's this bug won't be released i'm sure if i release it well be used for scamming purposes
can anyone give me SRO bot auto quest for new character
09/20/2011 - Silkroad Online - 1 Replies
plz plz plz plz HELp
plss can anyone give me battlefield play4free beta code i give u paypal €4,73 EURO
02/11/2011 - Battlefield - 2 Replies
plss can anyone give me battlefield play4free beta code i can give u paypal account with €4,73 :)



All times are GMT +1. The time now is 04:07.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.