Subject | Re: another make my query faster question |
---|---|
Author | Adam |
Post date | 2006-07-14T00:34:26Z |
> i originally only had a unique index on TITLE.NAME but adding anDon't duplicate the index. Do you mean you only had a unique
> ascending an descending index on NAME didn't make any difference to
> the plan or the speed of the query.
constraint on NAME but you added an ascending index and a descending
index? If so, the unique constraint will automatically add an
ascending index, so there is no need to add yet another index.
The larger question is whether there is a need to solve this problem
at all.
---
In another post, you wrote:
WHERE TITLE.METAPHONE = METAPHONE('after the ball')
OR TITLE.NAME CONTAINING 'after the ball'
And in another post I asked:
1) Why do you need the OR condition?
If anything is guaranteed to match a soundex, it is an identical
string. Just seems like extra work with no benefit to me.
---
If your title was, 'Running after the ball' then it may not appear
identical in your metaphone function, but then if you want to use an
index, you cant use containing. You would need Starting With or = or
a Like that can be optimised into a Starting With to make use of an
index. With containing, the metaphone index would not be useful
because even the records that do not need to be considered by the
metaphone index still need to be considered by the containing clause.
Adam