Dell Sala wrote: >>> http://www.sphinxsearch.com/ > > On Nov 27, 2007, at 4:37 PM, Rob Marscher wrote: > >> The search only returns the primary keys for the matched records. You >> then have to do a separate mysql query to get any extra details... but >> you'd be surprised how fast searching mysql via those primary keys >> is. You don't need any where clause because your search has already >> been narrowed. > > Cool. But doesn't this require 1 SQL query for each result item? (50 > results per page == 50 queries per page)? I suppose they ARE fast > queries. I've run into this situation a few times in other contexts. Is > there a clean way to retrieve records by filtering against a list of > primary key values, all in one SQL query? Just curious...
SELECT * FROM mytable WHERE myid IN (1,2,3,4) Dan _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
