On Tue, Nov 23, 2004 at 09:55:15PM +0100, [EMAIL PROTECTED] wrote:
> * Jesse Sheidlower
> [...]
> > CREATE TABLE `citation_subject` (
> >   `id` int(11) NOT NULL auto_increment,
> >   `citation_id` int(11) NOT NULL default '0',
> >   `subject_id` int(11) NOT NULL default '0',
> >   PRIMARY KEY  (`id`),
> >   KEY `citation_id` (`citation_id`,`subject_id`)
> > )
> 
> Try adding an index with subject_id as the first column.
> 
> ALTER TABLE `citation_subject` ADD INDEX (`subject_id`,`citation_id`);

Thanks. This did help slightly--I didn't realize that the
order of this would make such a difference, if both were
always being used.

I'm now coming to the determination that there are other
parts of the application functioning as the biggest drags.
If this is so, I apologize for the wasted bandwidth; I'm
still poking at this query though.

Jesse Sheidlower

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to