Creating Indexes
Indexes are a special system that databases use to improve the overall performance. By setting indexes on your tables, you are telling MySQL to pay particular attention to that column (loosely said). In fact, MySQL creates extra files to store and track indexes efficiently.
MySQL allows for at least 16 indexes for each table, and each index can incorporate up to 15 columns. While a multicolumn index may not seem obvious, it will come in handy for searches frequently performed on the same combinations of columns (e.g., first and last name, city and state, etc.).
Altering TablesThe ALTER SQL term is primarily used to modify the structure of a table in your database. Commonly this means adding, deleting, or changing the columns ... |
Get PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.