Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: IN Operator search for words Post Reply Post New Topic
Author Message
vzh101
Groupie
Groupie
Avatar

Joined: 12 Feb 2015
Location: United States
Online Status: Offline
Posts: 46
Quote vzh101 Replybullet 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 IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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 IP Logged
vzh101
Groupie
Groupie
Avatar

Joined: 12 Feb 2015
Location: United States
Online Status: Offline
Posts: 46
Quote vzh101 Replybullet Posted: 12 Oct 2015 at 9:16am
How would you do the query command?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet 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 IP Logged
vzh101
Groupie
Groupie
Avatar

Joined: 12 Feb 2015
Location: United States
Online Status: Offline
Posts: 46
Quote vzh101 Replybullet Posted: 14 Oct 2015 at 7:37am
Thanks! I will give it a try!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.