[TYPO3-dev] How to do a performance-friendly search?

Lars Haendler typo3 at larshaendler.com
Fri Oct 17 11:17:20 CEST 2008


Hi,

Georg Ringer wrote:
> Hi Steffen,
>> parse your search params and build the query with ' AND '
>> Search in tt_content or more tables?
> 
> hm will this lead to the best results?
> 
> Imagine the months are an OR search and the difficulty is a AND search.
> 
> So i also need for every month an own db field? because if I would use 
> one db field for all months, the values are saved in this awkward way.
> 
> It will be the main table and a category table or so.
> 
> Georg

I do something similar at the moment but with languages courses.

You will get big queries but if work with M:M relations they can be 
handled with joins and that will lead to much clearer SQL-Syntax to 
debug than those never-ending AND and OR constructions.


As for the months - if you talk about months in general not a certain 
month in a certain year - best store them separatly and connect them 
M:M. If you do the indexes in MySQL right that will be quite fast.

Cheers
Lars




More information about the TYPO3-dev mailing list