How to improve the efficiency of TSYS resource features

Source: Internet
Author: User

Http://www.tsov.net/blog/article.asp? Id = 416
TSYS resources are stored in the numeric type. Therefore, it is troublesome to update files and change the type to the numeric type directly, which is convenient and more efficient.
For example:
Original method:
SQL = "select Top 5 Title, FilePath, SmallImg, batch content, AddTime From view_NewsInfo where Class = 61 and Instr (',' + Speciality + ', 29 ,') <> 0 order By Id DESC"

The Speciality model in the database is Numeric. The default value is 0,
SQL = "select Top 5 Title, FilePath, SmallImg, limit content, AddTime From view_NewsInfo where Class = 61 and Speciality = 29 order By Id DESC"

At the same time,
... Where Class = 61 and Speciality = 29 ....
And
... Where Speciality = 29 and Class = 61 ....
The execution efficiency is also different,
The former queries all the content features before querying the features.
The former is more efficient than the latter.

In addition:
Supplement:
Modify
'Speciality = Replace (Request ("Speciality"), "", "") This is the original
Speciality = Request ("Speciality ")

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.