We have a complicated query that runs in about 1 to 2 seconds (and returns 413 rows) with this as one of the criteria:
and pitem.proc_code like 'BLD2012-01' + '%'
but if we change that criteria to this:
and pitem.proc_code like 'BLD2012-00' + '%'
it runs in 10 to 21 seconds and returns 997 rows.
We're mystified as to why it would take at least 5 t...
Skills: microsoft sql server programming