i've heard it said that every so often (eg every month) you need to rebuild
indexes on tables, as over time they lose their performance enhancement.
could that be true?
dan
-----Original Message-----
From: Tim Samshuijzen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 6 February 2001 04:50
To: [EMAIL PROTECTED]
Subject: Re: amazingly slow
Dear Dave,
Thanks for your reply.
(The table actually works with word numbers, as the words
are present in a hash table. I explained it the way I did
because functionally it is the same. So the actual search
is for WordNumber values instead of Word values.)
I did the EXPLAIN as you suggested.
Here is the output:
mysql> EXPLAIN SELECT B.* FROM maintable AS B ,
-> wordindex AS YL1 ,
-> wordindex AS YL2 ,
-> wordindex AS YL3 WHERE
-> YL1.WordNumber = 123 AND
-> YL1.RecordNumber = B.RecordNumber AND
-> YL2.WordNumber = 345 AND
-> YL2.RecordNumber = B.RecordNumber AND
-> YL3.WordNumber = 678 AND
-> YL3.RecordNumber = B.RecordNumber AND
-> B.Price >= 1000
-> LIMIT 0,51;
+-----+------+-----------------------+------------+-------+----------------+
----+----------+
|table|type |possible_keys |key |key_len|ref
|rows|Extra |
+-----+------+-----------------------+------------+-------+----------------+
----+----------+
|YL3 |ref |WordNumber,RecordNumber|WordNumber | 4 |???
| 1 | |
|B |eq_ref|PRIMARY |PRIMARY | 4
|YL3.RecordNumber| 1 |where used|
|YL2 |ref |WordNumber,RecordNumber|RecordNumber| 4 |B.RecordNumber
| 23 |where used|
|YL1 |ref |WordNumber,RecordNumber|RecordNumber| 4 |B.RecordNumber
| 23 |where used|
+-----+------+-----------------------+------------+-------+----------------+
----+----------+
4 rows in set (0.01 sec)
This still does not tell me why the query is amazingly slow.
Tim
At 10:52 AM 6-2-2001 +0000, you wrote:
>Tim Samshuijzen <[EMAIL PROTECTED]> writes:
>
>> Anyone out there who wants to save me and our company?
>
>You missed the important first step: EXPLAIN the query.
>
>--
>Dave Hodgkinson, http://www.hodgkinson.org
>Editor-in-chief, The Highway Star http://www.deep-purple.com
> Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
> -----------------------------------------------------------------
>
>---------------------------------------------------------------------
>Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail
<[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php