Re: Speeding up a query by narrowing it down

From: Date: Thu, 30 Nov 2006 05:02:42 +0000
Subject: Re: Speeding up a query by narrowing it down
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-42777@lists.php.net to get a copy of this message
benmoreassynt wrote:
Index details:
contents  0 PRIMARY 1 id A 56   NULL NULL BTREE          contents 1 fulltextindex 1 fulltext NULL 1 NULL NULL YES FULLTEXT
I tried indexing all the fields separately and together (for example an index that included fulltext, startdate and enddate). In fact more complex indexing only slowed the searches down, or had no effect because MySQl would always stick with the fulltext index. The fields are id filename fulltext startdate enddate series volume
Hmm maybe try it as a self-join. select id, blah from contents c1 inner join contents c2 using (id) where c1.somefield < 1500 and c1.someotherfield > 1500 and match(c2.fulltext) against ('search term'); No idea if that will work or produce right results though ;) -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#42777) next »