WHERE firm='Mersedes Benz' AND model='e320' AND body='221' AND ( kaywords LIKE '%1998%' OR kaywords LIKE '%1999%' OR kaywords LIKE '%2000%' OR kaywords LIKE '%2001%' OR kaywords LIKE '%2002%' OR kaywords LIKE '%2003%' OR kaywords LIKE '%2004%' OR kaywords LIKE '%2005%' OR kaywords LIKE '%2006%' OR kaywords LIKE '%2007%' OR kaywords LIKE '%2008%' OR kaywords LIKE '%2009%' OR kaywords LIKE '%2010%' OR kaywords LIKE '%2011%' OR kaywords LIKE '%2012%' OR kaywords LIKE '%2013%' OR kaywords LIKE '%2014%' OR kaywords LIKE '%2015%' OR kaywords LIKE '%2016%') AND type='2' AND state='0' AND price BETWEEN 79000 AND 10000000 
  • one
    And what do you understand by optimization? No optimization is possible in principle when like is used starting at '%'. Because in this case, in any case, there will be a complete enumeration of the table (unless of course other conditions on the index do not work out before this). For a good set of keywords should be in a separate table, that would be a clear equality (with the ID of words) to compare - Mike
  • one
    Show the table structure. And if it turns out that its designer did not provide for a separate field (s) for the year (s) - the ways of optimization are obvious ... - PinkTux
  • here is yadi.sk/i/eKp3yY4ZvGeBo thanks in advance - Gev
  • years are written in the format 1985-1997 - Gev
  • I did everything, thanks for the advice - Gv

0