Select title from book 300,000 Where to categorize like '% ' + @typen + '% '
*/
declare @a datetime,@b nvarchar (4)
set @a=getdate ()
Select title from book 300,000 Where class like '% medicine% '--"category" column has nonclustered index, faster than clustered index 1150, almost execution time around 1100
--Select title from GETHL (' medicine ')--using user-defined functions, efficiency and building a clustered index is a little slower than 1150-1200
--Execute GETFL ' medicine '--calling a stored procedure cannot contain parameters in parentheses Execute getfl (' medical ')
--Select title from VIEW1--View
print ' Run time:
Print DateDiff (Ms,@a,getdate ())
Conclusion:
1, all the above use direct query, function, view, stored procedure performance is similar;
2. In this text field, nonclustered is better than clustered index.
A better way to do this is to create a corresponding retrieval ID on another table, faster!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.