473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Query takes 17 seconds, suggestions needed

I am building a website which stores the headers of newsgroup articles in a
database so people can search through the headers using keywords.

My queries use WHERE LIKE statements.

CREATE TABLE `headers` (
`header_id` int(11) NOT NULL auto_increment,
`header_num` int(11) NOT NULL default '0',
`message_id` varchar(150) NOT NULL default '',
`subject` varchar(200) NOT NULL default '',
`poster` varchar(75) NOT NULL default '',
`postdate` int(11) default NULL,
`newsgroup` varchar(100) NOT NULL default '',
`partnum` int(11) NOT NULL default '0',
`parttotal` int(11) NOT NULL default '0',
`numlines` int(11) NOT NULL default '0',
`bytes` int(11) NOT NULL default '0',
`date_added` timestamp(14) NOT NULL,
`sortfield` varchar(200) NOT NULL default '',
PRIMARY KEY (`header_id`)
) TYPE=MyISAM

The SORTFIELD column is a string, made up of SUBJECT. Using RegExps I cut
off things like RE: so that I can group similar subjects and sort on that
field.

Currently I have 5 million records in this table and searching the table
takes 17 seconds to generate an output.

I have tried using FULLTEXT indexes but I dropped this because FULLTEXT does
not allow partial searches e.g. wildcard-searches.

How can I speed up my results? I'm very much in the dark here. I want the
user to be able to do a GLOBAL search and not limit them by making them
select the newsgroup to search in before they submit theit keywords.

Any help would be very much appreciated.
Jul 20 '05 #1
0 1127

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
6
by: Ondernemer | last post by:
I am building a website which stores the headers of newsgroup articles in a database so people can search through the headers using keywords. My queries use WHERE LIKE statements. CREATE TABLE...
5
by: Jason | last post by:
The following stored procedure is taking too long (in my opinion). The problem seems to be the SUM line. When commented out the query takes a second or two. When included the response time climbs...
3
by: Paul Mateer | last post by:
Hi, I have been running some queries against a table in a my database and have noted an odd (at least it seems odd to me) performance issue. The table has approximately 5 million rows and...
3
by: robboll | last post by:
Whenever I query my database using Enterprise Manager, the response time is about a second. When I access the same data via a Cold Fusion webpage, it takes about 15 seconds (or more) to resolve. ...
4
by: Richard Hollenbeck | last post by:
The following query takes about one second to execute with less than 1,000 records, but the report that's based on it takes from 15-30 seconds to format and display. That's frustrating for both me...
15
by: Rolan | last post by:
There must be a way to enhance the performance of a query, or find a plausible workaround, but I seem to be hitting a wall. I have tried a few tweaks, however, there has been no improvement. ...
12
by: strict9 | last post by:
Hello all, I'm writing several queries which need to do various string formating, including changing a phone number from (123) 456-7890. After some problem with data mismatches, I finally got it...
11
by: Andy_Khosravi | last post by:
My problem: I'm having trouble with a query taking much too long to run; a query without any criteria evaluating only 650 records takes over 300 seconds to run (over the network. On local drive...
5
by: parwal.sandeep | last post by:
Hello grp! i'm using INNODB tables which are using frequently . if i fire a SELECT query which fetch major part of table it usually take 10-20 seconds to complete. in mean time if any UPDATE...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.