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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:48:38+00:00 2026-06-01T10:48:38+00:00

I am into some problems atm, that is, I have a database of some

  • 0

I am into some problems atm, that is, I have a database of some words, which is like 900,000 and what I am trying to do is, check whether a word is in it, and if yes, return another field in the row.

I get timedout when I do that.I know I can change the timeout, but what I actually want is to make it faster somehow if possible. My visitor wont like to wait 30+ secs to get what he is looking for.

I cant make 900,000k static files because I have inodes limit in the hosting.

So I am pretty much locked up, so any thing that I can do to make it better?

Table structure :

ID | Word | Otherword

CREATE TABLE `database` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `word` text COLLATE utf8_unicode_ci NOT NULL,
 `md5string` text COLLATE utf8_unicode_ci NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=966277 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

Query:

mysql_query("SELECT otherword FROM table WHERE word='$word'");

Another query:

mysql_query("SELECT word FROM table WHERE otherword='$otherword'");

Main query (a file using GET)

$word = $_GET["word"];
echo $word;
$check = mysql_query("SELECT md5string FROM `database` WHERE word='$word'") or     die(mysql_error());
while (mysql_num_rows($check)>0)
{
$out = mysql_fetch_array($check);
$output = $out[0];
}
  • 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-01T10:48:40+00:00Added an answer on June 1, 2026 at 10:48 am

    Searching over 1 million rows in a MySQL database shouldn’t be a problem providing you have a sensible index.

    Try adding an index to your database, like this (assuming the word you’re looking for is in a column on it’s own):

    ALTER TABLE your_word_table ADD KEY(word_column(32));
    

    (editted to include key length since it turns out they’re TEXT columns)

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

Sidebar

Related Questions

I have been trying to learn Erlang and have been running into some problems
I'm trying to build my first generic list and have run into some problems.
I've run into some problems when trying to serialize my object to XML. The
Looking for some direction here as I'm running into some migration problems. We have
I've run into some problems debugging a multi-threaded process using GDB. I have a
while trying to deploy a Grails application into tomcat6 I ran into some problems:
I'm trying out java and I seem to be running into some problems. The
I just started android and I'm running into some problems. I have created a
I'm running into some problems with user-entered input that I want to send to
I run into some problems when trying to solve a problem I had with

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.