NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need About creating search

Dell Sala dell at sala.ca
Tue Nov 27 16:56:19 EST 2007


>> 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...

-- Dell




More information about the talk mailing list