Jump to content
  • 0

Database Optimisation - Delete Unused Accounts


Question

12 answers to this question

Recommended Posts

  • 0
Posted

use lin2db

select * from user_account

where last_login > 2013-08-29 replace date.

 

 

well if you want an automatic script you'll have to use joins\innerjoins to delete between lin2db\lin2world

Read up on SQL queries - and how delete from several tables with 1 select.

 

EDIT:

 

Ninja edit - i'd probably create multi'tiered Stored Procedure to run by SQL agent.

 

so you first delete from table where last_login > DATEADD(mm,-30,GETDATE()) --// example with 30 days not logged accounts.

from user_account

 

and then run a series of queries for user_data etc like this:

 

DELETE FROM [lin2db].[dbo].[user_auth] WHERE account Not In (SELECT account FROM [lin2db].[dbo].[user_account]);

DELETE FROM [lin2world].[dbo].[user_data] WHERE account_id Not In (SELECT uid FROM [lin2db].[dbo].[user_account]);

 

same for char_id in user_item and all other tables.

  • 0
Posted

use [lin2db]

select * from user_account

where last_login > 2013-17-01

 

returns same record all over the time , no matter what date do I setup.

Shows ALL records from user_account not sorted by date

 

where last_login = 2013-17-01

where last_login < 2013-17-01

last_login > DATEADD(mm,-30,GETDATE())

 

Does`t give Returns at all

 

use [lin2db]

DELETE * from user_account

where last_login > DATEADD(mm,-30,GETDATE())

 

Incorrect syntax near '*'.

  • 0
Posted

DELETE * from user_account

 

remove * not used - seriously try a bit yourself.

 

where last_login < 2013-17-01

 

needs to be > - it's reversed bits in the way dateformat is stored.

  • 0
Posted

Btw and all the characters, if any, what happens with them ? It shouldn't be better to remove the characters and their data 1st and then lin2db ? In fact i didn't needed to optimize lin2db it isn't kicked so hard, lin2world has a nice kick on the harddrive.

  • 0
Posted

Btw and all the characters, if any, what happens with them ? It shouldn't be better to remove the characters and their data 1st and then lin2db ? In fact i didn't needed to optimize lin2db it isn't kicked so hard, lin2world has a nice kick on the harddrive.

Good point. I think I will make a querry for that.

  • 0
Posted

Because associating the unique remove factor - by account id is easier than weird inner joins with login dates from user_auth.

 

Same with then having to remove data from user_item, and other bigger tables.

 

 

start from top, and remove down heirachy wise :P

  • 0
Posted

Because associating the unique remove factor - by account id is easier than weird inner joins with login dates from user_auth.

 

Same with then having to remove data from user_item, and other bigger tables.

 

 

start from top, and remove down heirachy wise :P

I my next release of GM Panel I will add a future for that.

  • 0
Posted (edited)

Because associating the unique remove factor - by account id is easier than weird inner joins with login dates from user_auth.

 

Same with then having to remove data from user_item, and other bigger tables.

 

 

start from top, and remove down heirachy wise :P

And what about the content ? If new people creates new accounts the system won't assign them the empty numbers ? Giving new accounts other chars ? Or it adds numbers exponentially ?

Edited by Sighed
  • 0
Posted (edited)

If you delete chars from acc and from all tables in lin2world base i doubt that this problem will happen.

Edited by xeL
  • 0
Posted

Primary Key solves those issues - with the account_id and name.

 

That's why starting to remove from the top - and then remove user_data , and then on to skill, item etc etc.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • just with this extender that I have shared it is not possible to start with c4 client, you have to make some changes to the extender and it works with c4 client perfectly. regarding the updates in this last revision   🔹dll is not packaged with vmprotect   New custom zone types have been added: 🔹 NO_NOBLESS begin MinX=84638 MaxX=92616 MinY=-87170 MaxY=-82018 MinZ=-6000 MaxZ=0 Type=NO_NOBLESS KickOutPos=83007/148057/-3464 end   ▶️ This zone checks if the character is noble. If it does not meet the condition, it will be automatically kicked to the indicated position (KickOutPos). 🔹 CUSTOM_SPAWN_ZONE begin MinX=77275 MaxX=85704 MinY=10122 MaxY=18066 MinZ=-8000 MaxZ=5000 Type=CUSTOM_SPAWN_ZONE OutPos=83007/148057/-3464 Spawns={{82984/18066/-5256}};{{79275/15147/-5248}};{{82922/14263/-5256}};{{83704/10122/-5288}} end ▶️ This zone allows characters, upon death, to respawn with full buff, CP, HP and MP if they press “Fixed”. They will only be able to revive in one of the positions defined in Spawns. 🔧 Both zones are fully configurable from territorydata.txt
    • Could you tell me what changed in this update?   more one question: Is it possible to log in through the c4 client instead of interlude? That would be great  
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock