Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8100217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:41:18+00:00 2026-06-05T22:41:18+00:00

I need an MySQL Skript which does the following: delete chunks of the database

  • 0

I need an MySQL Skript which does the following:

delete chunks of the database until it has deleted all link_id’s greater then 10000

exmaple:

x = 10000
DELETE FROM pligg_links WHERE link_id > x and link_id < x+10000
x = x + 10000
...

So it would delete

DELETE FROM pligg_links WHERE link_id > 10000 and link_id < 20000

then

DELETE FROM pligg_links WHERE link_id > 20000 and link_id < 30000

until all id’s less then 10000 have been removed

I need this because the database is very very big (more then a gig)

thank in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:41:19+00:00Added an answer on June 5, 2026 at 10:41 pm

    what is the problem in ::

    DELETE FROM pligg_links WHERE link_id > 10000
    

    There is another way of doing it:(Just execute these 3 queries in order)

    Step1 : Insert into pligg_links_temp select * from pligg_links where link_id < 10000;
    Step2 : Drop pligg_links;
    Step3 : Insert into pligg_links select * from pligg_links_temp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a MySql statement that will select all the rows, as well as
Hi I need to backup MySQL database and then deploy it on another MySQL
We have a query(mysql) which returns data in the following format of alphabets followed
I'm working with a mysql database, which involves gathering photos and peoples names and
I need to be able to run all of the following within one query
I need to be able to write a script to automatically connect mysql in
I need a MySQL query (or function) to calculate the geographic midpoint of an
I need a MySQL pattern to match a number, followed by a question mark.
I need to install mysql on the system. As usual I typed in gem
I need to have MySQL query like this one: UPDATE table_name SET 1 =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.