Tsys the efficiency improvement of resource characteristics _ application Techniques

Source: Internet
Author: User
http://www.tsov.net/blog/article.asp?id=416
Tsys resource characteristics of the character storage, so in the update file to judge more trouble, directly to change the type to numerical type, convenient, efficiency also improved.
Such as:
The original method:
Sql= "SELECT Top 5 title,filepath,smallimg,shortcontent,addtime from View_newsinfo where class=61 and Instr (', ' + Speciality+ ', ', ', ', ') <>0 order by Id DESC "

The model for speciality in the modified database is numeric, the default value is 0, and after that,
Sql= "SELECT Top 5 title,filepath,smallimg,shortcontent,addtime from View_newsinfo where class=61 and speciality=29 order by Id DESC "

While
... where class=61 and speciality=29 ....
And
... where speciality=29 and class=61 ....
The efficiency of execution is also different,
The former query from the large class, and then query the characteristics, the latter is to query all the characteristics of the content, and then query the classification.
The former is more efficient than the latter.

Other:
2006-8-7 Day Supplements:
And then modify the file news_mdy.asp in line 120.
' 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.