Subject Re: SQL Performance help
Author Adam
--- In, Robert martin <rob@...> wrote:
> Hi
> Thanks Adam. Yes the IN clause is the bottleneck. I have just
solved ?
> the issue by creating a stored procedure that handles the IN part so my
> query now looks like...
> SELECT bk.ISBN13, bk.FTI
> FROM Book bk
> JOIN Pr_BookWordAndSearch('WET', 'WILD', NULL, NULL, NULL, NULL, NULL,
> NULL, NULL, NULL) p ON p.ISBN13 = bk.ISBN13
> This produces records in .1 < ms and should work great.

> The only downside (apart from shear ugliness) is that it limits our
> to up to 10 search words.

Don't you wish there was an edit button sometimes.

Another possibility is if you parse your title within the stored
procedure. This will help in that end:

You would then change your stored procedure to contain a single input
parameter (up to 32K, depends on your needs).

From inside your stored procedure, you would do something like:

FROM SPLITTEXT(:BookTitle, ' ', '-, ''')

This would allow you effectively an unlimited number of search words.