Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Jul 2017, 12:36
Fynnon Fynnon is offline
 
Join Date: Jul 2008
Remove multiple rows from table

In table 'users' i have too many rows and i want to delete most of them.
How can i delete every row from 5001 to 50000 ? I want to keep just the first 5000 rows
Reply With Quote
  #2  
Old 05 Jul 2017, 14:44
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Real name: Tim
Why so many tables and what is in them?
__________________
LONG LIVE 3.8 SERIES
National Arcade Competition Club- NACC All arcade edits will work on vb4.
Check out my heavily modified ibproarcade with over 50,000 games for you, free of charge!
Exclusive arcade addons, edits and skins were made by stangger5 owner of Next Level Arcade
Reply With Quote
  #3  
Old 06 Jul 2017, 06:27
Fynnon Fynnon is offline
 
Join Date: Jul 2008
they are unused user accounts.
i have access to phpmyadmin but i'm not sure how can i remove those
Reply With Quote
  #4  
Old 06 Jul 2017, 10:45
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Real name: Kane
Why not just prune users from ACP/Users with the criteria set at whatever "Has not logged on for x days" and post count less than 1?
Reply With Quote
  #5  
Old 06 Jul 2017, 13:40
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Real name: Tim
Backup your database from within phpmyadmin.
On your main database, select each table you are wanting to drop, scroll below the table list and select, "Drop Selected".
Good Luck!
__________________
LONG LIVE 3.8 SERIES
National Arcade Competition Club- NACC All arcade edits will work on vb4.
Check out my heavily modified ibproarcade with over 50,000 games for you, free of charge!
Exclusive arcade addons, edits and skins were made by stangger5 owner of Next Level Arcade
Reply With Quote
  #6  
Old 06 Jul 2017, 14:54
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by Fynnon View Post
In table 'users' i have too many rows and i want to delete most of them.
How can i delete every row from 5001 to 50000 ? I want to keep just the first 5000 rows
One word. Dont.

Its a bad idea, there are far more tables associated with users than just the user table.

There is also nothing to be gained by doing it.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #7  
Old 13 Jul 2017, 12:01
Fynnon Fynnon is offline
 
Join Date: Jul 2008
I'll leave the users as it is, thanks !

there is another table from a mod which records everyone who used the chat and it has over 2.000.000 rows
of course it would take forever to remove them page by page so i'm looking for an sql command to clean old & inactive ones

Last edited by Fynnon; 13 Jul 2017 at 12:07.
Reply With Quote
  #8  
Old 13 Jul 2017, 15:26
Mark.B Mark.B is offline
 
Join Date: Feb 2004
What is the table called?
If it's specific to that mod and the mod is now uninstalled you MIGHT be able to get rid of it but we would need more details.

Be careful also of the differences between tables and columns.
__________________
MARK.B (Member of the vB Support Team)
Reply With Quote
  #9  
Old 14 Jul 2017, 08:39
Fynnon Fynnon is offline
 
Join Date: Jul 2008
the database is called: 'infernoshoutusers'
i use the mod but it has '2.882.822' rows, they are 1/3 of the forum db size
Attached Images
File Type: jpg Untitled.jpg (81.2 KB, 13 views)

Last edited by Fynnon; 14 Jul 2017 at 08:50.
Reply With Quote
  #10  
Old 14 Jul 2017, 08:52
Mark.B Mark.B is offline
 
Join Date: Feb 2004
Before doing anything in the database, does the mod have any sort of pruning option?
Or does it have a cron job as part of it, and if so, is it running? Try running any cron for it manually.

Beyond that it might be worth backing up the data from that table alone, then truncating it and seeing what effect it has on the modification.

It shouldn't affect the main forums as it's a custom table, it should inky affect the mod.
__________________
MARK.B (Member of the vB Support Team)
Reply With Quote
  #11  
Old 31 Jul 2017, 07:57
Fynnon Fynnon is offline
 
Join Date: Jul 2008
thanks for the suggestions
the mod does have a prune option but that removes everything from the chat and i want to keep some of it

i want to delete only specific rows from that table, basically just the last 2/3 of the table, by using an sql command
the size of the is around db if 80MB which is 1/3 of the total so i was thinking maybe i can reduce it to improve speed
Reply With Quote
  #12  
Old 31 Jul 2017, 12:30
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Originally Posted by Fynnon View Post
the database is called: 'infernoshoutusers'
i use the mod but it has '2.882.822' rows, they are 1/3 of the forum db size
Why in the world is this 1/3 the size of your database? Inferno shoutbox... isn't that the one only available on nulled type sites? I could be wrong but using mods from sites like that can leave it/you open to exploits, perhaps there are just that many users in the shoutbox but are there that same number of users on the actual forum? If not look to see if the inferno shoutbox is being exploited somehow and fix if you intend to keep... if that is the case though I'd simply remove it, best to not run mods from nulled/cracked sites.
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #13  
Old 31 Jul 2017, 17:47
Rafa-el's Avatar
Rafa-el Rafa-el is offline
 
Join Date: Feb 2010
Location: Nicaragua
Real name: Rafael Benard
Originally Posted by Fynnon View Post
thanks for the suggestions
the mod does have a prune option but that removes everything from the chat and i want to keep some of it

i want to delete only specific rows from that table, basically just the last 2/3 of the table, by using an sql command
the size of the is around db if 80MB which is 1/3 of the total so i was thinking maybe i can reduce it to improve speed
In one word: NO.

Besides, even tough reducing the DB size is always good, the main issue is your shoutbox plugin, you're better off with it so I strongly advise you to uninstall it, anyone with minimal knowledge could get into your site and dump the DB with a simple exploit if you use a nulled or abandoned product.
Reply With Quote
  #14  
Old 01 Aug 2017, 07:32
Fynnon Fynnon is offline
 
Join Date: Jul 2008
some logging option was on by default and maybe that explains the size. all my mods are from vb.org
Inferno Shoutbox was available a long time ago on vBulletin.org: https://www.vbulletin.org/forum/showthread.php?t=147346

Last edited by Fynnon; 01 Aug 2017 at 07:40.
Reply With Quote
  #15  
Old 01 Aug 2017, 17:17
Rafa-el's Avatar
Rafa-el Rafa-el is offline
 
Join Date: Feb 2010
Location: Nicaragua
Real name: Rafael Benard
Originally Posted by Fynnon View Post
some logging option was on by default and maybe that explains the size. all my mods are from vb.org
Inferno Shoutbox was available a long time ago on vBulletin.org: https://www.vbulletin.org/forum/showthread.php?t=147346
Either way the last time the shoutbox was updated was in 2008, 9 years ago! That's not safe at all, specially when it comes with BB's when a lot of exploits tend to be published with manuals.
Reply With Quote
Reply



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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:30.

Layout Options | Width: Wide Color: