Re: Mysql strategy

From: Date: Mon, 13 Nov 2006 00:14:52 +0000
Subject: Re: Mysql strategy
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-244540@lists.php.net to get a copy of this message
Dotan Cohen wrote:
If I have to perform 30 LIKE searches for different keywords in a varchar field, which strategy would be recommended: 1) 30 searches, one for each keyword
No. Horribly inefficient.
2) To select the varchar field from all the rows, and search through them with php's array functions?
No. Make the database do the work. Use full text indexing: http://dev.mysql.com/doc/refman/4.1/en/fulltext-search.html -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#244540) next »