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 3439288
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:17:29+00:00 2026-05-18T08:17:29+00:00

Good day, friends. I’m running Fedora 13 on a 32b machine. I have a

  • 0

Good day, friends. I’m running Fedora 13 on a 32b machine.

I have a huge table of 1.5B ip addresses (which will be split up when I have the resources, don’t worry ;)). When I run this query:

SELECT ip FROM ips ORDER BY RAND() LIMIT 500000;

Sometimes the table crashes (I get the error “MySQL Table is Marked as Crashed and Should be Repaired”), sometimes it doesn’t. My question is; what sorts of things cause MyISAM or InnoDB tables to crash? Does memory have an affect? Because my system monitor shows it only uses about 30%.

Here is my.cnf (the default, installing from meta-package):

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

Also; I hear PostGreSQL is ‘more robust’ and doesn’t crash like MySQL does in these situations. Is this true or is it a wives tale?

  • 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-05-18T08:17:30+00:00Added an answer on May 18, 2026 at 8:17 am

    Sorting 1500M of IP addresses is not the best idea.

    If you want 500K random IP addresses, use this approach:

    • Selecting random rows

    It won’t be too efficient as well, though, since it needs two passes over the table.

    You may put a rough estimate of the COUNT(*) instead of the subquery. This will speed the query up, at cost of a slight opportunity of missing some addresses or getting fewer results than needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day. I have developed an application which works successfully on my local machine
Good day... I have huge trouble with this and it drives me insane. My
Good day, I have a hibernate mapping which goes something like this <class name=Person>
Good day friends! I'm experiencing one huge problem here! First, I posted a question
Good day, friends. I have a PreferenceActivity, it is filled from XML file. When
Good day friends! I have 2 model classes say Page and PageHistory . both
Good day, In SQL Server 2005, I have a table numerous columns, including a
Good day, I have a class that implements the LoaderCallbacks, and hence have the
Good day, just a quick question: I would like to bind a table to
Good day I have a custom TextBox that has a IndicatorTextBox.ui.xml file as well

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.