I have a column with TEXT
datatype that needs to store huge amounts of text so I have to use the TEXT
datatype.
But this column need to be frequently searched. What should I do if I want that search faster than before?
This is my query (max DATALENGTH
for column workDescription
are 399721)
SELECT [workID],
[staffID],
[workDate],
[startTime],
[endTime],
[projectID],
[timeFor],
[workType],
[workTitle],
[workDescription], ---> text datatype
[isDeleted],
[createdDate],
[createdBy],
[lastUpdate],
[updatedBy]
FROM [IndosoftDb_LIVE].[dbo].[tblTimesheet]
WHERE [workDescription] LIKE '%event%'
OR [workTitle] LIKE '%event%'
Note : my PM doesn't want to change it to VARCHAR(MAX)
. He was afraid that data is truncated.