Through ASP programming, we can easily see two kinds of search query way, as follows:
sql= "SELECT id from B where id=" &id
sql= "SELECT ID from b where id like '%" &id& "%"
It can be said that the difference between the two kinds of query is very large, or to say and the big!
1. Querying directly by ID may not take time
2. Fuzzy query based on the content of the field and the amount of the database to determine the efficiency is very low
For example, by ID fuzzy query if it is 1 then ID all of the containing 1 are listed 1 10 11 12 13 .... 21st...
Usually by the title or content fuzzy query not by ID fuzzy query special content is a lot of! Fuzzy query is very resource-intensive! Use caution Otherwise the server CPU will go up. Large forums Of course there are specialized search optimization, such as search for a certain period of time is not all also possible to establish a full text search, etc., but still have to do the restrictions, otherwise the server can not afford to be disastrous