vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Remove multiple rows from table (https://vborg.vbsupport.ru/showthread.php?t=325331)

Fynnon 07-05-2017 09:36 AM

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

blind-eddie 07-05-2017 11:44 AM

Why so many tables and what is in them?

Fynnon 07-06-2017 03:27 AM

they are unused user accounts.
i have access to phpmyadmin but i'm not sure how can i remove those

Kane@airrifle 07-06-2017 07:45 AM

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?

blind-eddie 07-06-2017 10:40 AM

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!

Paul M 07-06-2017 11:54 AM

Quote:

Originally Posted by Fynnon (Post 2588150)
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.

Fynnon 07-13-2017 09:01 AM

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

Mark.B 07-13-2017 12:26 PM

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.

Fynnon 07-14-2017 05:39 AM

1 Attachment(s)
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

Mark.B 07-14-2017 05:52 AM

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.


All times are GMT. The time now is 06:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02364 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete