Prev | Current Page 322 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

This is called a full-table scan,
because the database engine cannot use any regular indexes to speed up the process of
finding the results. This can significantly slow down the overall performance, especially if
you have a large number of products in the database.
Quality of search results: This method doesn??™t make it easy for you to implement various
advanced features, such as returning the matching products sorted by search relevance.
Advanced search features: This method does not allow visitors to perform searches that
use the Boolean operators (AND, OR), inflected forms of words (such as plurals and various
verb tenses), or words located in close proximity.
So how can you do better searches that implement these features? If you have a large
database that needs to be searched frequently, how can you search this database without
killing your server?
The answer is by using MySQL??™s full-text search capabilities.
Searching Using the MySQL Full-Text Search Feature
Searching using LIKE, as explained earlier, is very inefficient because of the full-table scan
operation the database must perform when searching for a word. If you search for ???flower??? in
product descriptions, each product description is read and analyzed. This is the worst-case
scenario, as far as database operations are concerned.
CHAPTER 8 ?–  SEARCHING THE CATALOG 224
?– Tip Typical table indexes applied on text-based columns (such is varchar) improve the performance of
searches that look for an exact value or for strings that start with a certain letter or word.


Pages:
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
prezenty pisemne mieszkania szczecin wokar biuro rachunkowe gdańsk