| Author |
Message |
vzh101
Groupie
Joined: 12 Feb 2015
Location: United States
Online Status: Offline
Posts: 46
|

Topic: IN Operator search for words Posted: 09 Oct 2015 at 8:27am |
|
Anyone have performance issue (Slowness) when running a report using the IN operator to search for certain words in a field?
For Example:
{table.words} in ["Why", "is", "it", "so"...etc] OR
{table.sentence} IN ["Why is it", "so slow", "I need", "help"]
Anyway to speed up the process?
Just a note that I have a large database.
|
IP Logged |
|
|
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 09 Oct 2015 at 10:44am |
|
First of IN is a pretty big performance killer due to how it has to do the search. If you create a query (command) or a Stored Procedure, it probably would help.
|
IP Logged |
|
vzh101
Groupie
Joined: 12 Feb 2015
Location: United States
Online Status: Offline
Posts: 46
|

Posted: 12 Oct 2015 at 9:16am |
|
How would you do the query command?
|
IP Logged |
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 12 Oct 2015 at 11:55am |
|
This is MS-SQL format
Select (I do not know what fields you need) From (or the table(s) needed)
where table.words in ('Why', 'is', 'it', 'so') OR
table.sentence IN ('Why is it', 'so slow', 'I need', 'help')
I hope this helps.
|
IP Logged |
|
vzh101
Groupie
Joined: 12 Feb 2015
Location: United States
Online Status: Offline
Posts: 46
|

Posted: 14 Oct 2015 at 7:37am |
|
Thanks! I will give it a try!
|
IP Logged |
|
|
|