Jordan,

Ok, I'm out of ideas.  The additional index should have sped things up, not
slowed them down.  I've got some tables with 26,000 rows in it and I do 4
joins (using a WHERE clause) with smaller tables without a hitch.

Sorry I can't help.

Cal
http://www.calevans.com


-----Original Message-----
From: Jordan Russell [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 3:07 PM
To: Steve Ruby
Cc: Cal Evans; [EMAIL PROTECTED]
Subject: Re: Need help optimizing this (simple) query


> Do you have an index on files that starts with dir_id and
> an index on dirs that stats with id and having date in the files
> index (after dir_id) might be helpful although I'm not sure.

Sorry, I don't understand exactly what you mean, but...

> you could provide the output of
> show keys from files;
> show keys from dirs;
>
> it would be helpful..

...Here's the output of those queries (please pardon the word wrap):

mysql> show keys from dirs;
+-------+------------+----------+--------------+-------------+-----------+--
-----------+----------+--------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Comment |
+-------+------------+----------+--------------+-------------+-----------+--
-----------+----------+--------+---------+
| dirs  |          0 | PRIMARY  |            1 | id          | A         |
500 |     NULL | NULL   |         |
+-------+------------+----------+--------------+-------------+-----------+--
-----------+----------+--------+---------+

mysql> show keys from files;
+-------+------------+----------+--------------+-------------+-----------+--
-----------+----------+--------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Comment |
+-------+------------+----------+--------------+-------------+-----------+--
-----------+----------+--------+---------+
| files |          0 | PRIMARY  |            1 | id          | A         |
5000 |     NULL | NULL   |         |
| files |          1 | date     |            1 | date        | A         |
5000 |     NULL | NULL   |         |
+-------+------------+----------+--------------+-------------+-----------+--
-----------+----------+--------+---------+

Adding an index for dir_id on files did not help (see my other post).

Jordan Russell


---------------------------------------------------------------------
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

Reply via email to