On Thu, May 10, 2007 at 10:05:13AM +0200, Allen Young wrote: > Jens Kraemer wrote: > > Given Ferret's speed this is no waste, just try it. > > > But what if I put a bunch of joins and conditions in find_options? Will > it be still fast? I'm implementing search feature for material industry. > You know that how many properties a material may have, or just think > about a search according to the chemistry composition of the material, > so many chemistry elements.
You should try to use ferret instead of your DB as much as possible. Joins and conditions are applied after the ferret search to further narrow down the result set and, if speed is an issue, should only be used for things that really can't go into the index, i.e. checking for user permissions. It may be possible to gain some additional speed by using the results of a previous query as some kind of scope for the next one. I.e. you could keep the ids of your result set and use them as a base for your next query. However Ferret's API does not directly support incremental queries, you'd have to implement this yourself. Not impossible but imho you should only do this once you have 'real' data so you can measure what you gain by optimizing things. Jens -- Jens Krämer webit! Gesellschaft für neue Medien mbH Schnorrstraße 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

