LIKE '%dfjdsklfdfjdklfjds' is what is killing you.
LIKE 'sdfdklf%' can be indexed, but the leading wildcard
forces an index search.
Markus Wollny wrote:
> Hi!
>
> It seems I found one of the queries which suck up memory as if there
> were terabytes available.
--
P. J. "Josh" Rovero Sonalysts, Inc.
Email: rovero(at)sonalysts(dot)com www.sonalysts.com 215 Parkway North
Work: (860)326-3671 or 442-4355 Waterford CT 06385
***********************************************************************