Re: Index not being used

2010-03-08 Thread Joerg Bruehe
Hi all! Ananda Kumar wrote: > you should change the column order for the index sitefieldsort. > It should be (sortorder,siteid`,`fieldid`). NO! NEVER! (sorry for shouting) For any DBMS (this is not specific to MySQL), it is not possible to use a multi-column index unless values are given for t

Re: Index not being used

2010-03-05 Thread Ananda Kumar
you should change the column order for the index sitefieldsort. It should be (sortorder,siteid`,`fieldid`). regards anandkl On Fri, Mar 5, 2010 at 11:52 PM, Johnny Withers wrote: > I don't have your data, so I do not really know if my results are > "correct". > > I created this table on my syste

Re: Index not being used

2010-03-05 Thread Johnny Withers
I don't have your data, so I do not really know if my results are "correct". I created this table on my system and added two records: INSERT INTO form_fields_items(siteid,fieldid,`value`,sortorder) VALUES (1234,5678,'test1',0) ; INSERT INTO form_fields_items(siteid,fieldid,`value`,sortorder) VALU

Index not being used

2010-03-05 Thread Simon Kimber
Hi Everyone, I have the following table: CREATE TABLE `form_fields_items` ( `ID` int(11) NOT NULL auto_increment, `siteid` int(11) NOT NULL default '0', `fieldid` int(11) NOT NULL default '0', `value` varchar(150) NOT NULL default '', `sortorder` int(11) NOT NULL default '0', PRIMAR

Index not being used when Selecting a certain column

2007-10-27 Thread js
Hello, I encountered weird problem. I upgraded MySQL on my database on my app from 5.0 to the latest 5.1.22. After the upgrade, the app suddenly got very slow. A query, which was executed within about 0.1 sec, now took longer than a few minutes. (Actually, I don't know exactly how long it would t

Fulltext index not being used

2003-12-08 Thread trevor%tribenetwork.com
Fellow Mysqlians, Can anyone tell me why mysql refuses to use the fulltext index in the second query? Query 1; mysql> explain select straight_join distinct i.ID from INTEREST i use index (COMMENT) inner join PERSON p on p.ID=i.PERSON_ID where match(i.COMMENT) against('+