> On 15 Nov 2001, at 21:59, Carsten H. Pedersen wrote: > > > > PRIMARY KEY > > > (`collection_id`,`document_id`,`tcml_field_id`,`order_number`), > > > KEY `collection_field_value` > > > (`collection_id`,`tcml_field_id`,`value`(12)), > > > KEY `value` (`value`(12)), > > > KEY `resource_id` (`resource_id`) > > > ) TYPE=MyISAM > > > > <cut> > > > > MySQL can't make use of the PRIMARY KEY -- as the document_id > > part breaks any chance MySQL has of using the indexed > > collection_id-tcml_field_id relation. Try either adding a > > new index on just collection_id, tcml_field_id (and maybe > > value), or simply re-define your PRIMARY KEY so that those > > two fields make up the first part of the key. > > Thanks for the response, but I think you missed the key > collection_field_value right under the primary key above.
You're right -- Sorry. Have you tried COUNT'ing something other than *? i.e. document_id or resource_id? > Keith C. Ivey <[EMAIL PROTECTED]> / Carsten - smokin' 'em while he's still got 'em :-) -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq --------------------------------------------------------------------- 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