Re: Speeding up a query by narrowing it down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux