Home arrow PHP arrow Page 5 - Changing Table Structure in phpMyAdmin

Index Management - PHP

This chapter explores editing table definitions and using special column types. When developing Web applications (or any application), requirements often change because of new or modified needs. Developers must accommodate these changes through judicious table-structure editing. This is chapter six of Mastering phpMyAdmin for Effective MySQL Management by Marc Delisle (Packt Publishing, April 2004, ISBN 1904811035).

TABLE OF CONTENTS:
  1. Changing Table Structure in phpMyAdmin
  2. Editing Field Attributes
  3. BLOB (Binary Large Object)
  4. ENUM and SET
  5. Index Management
  6. Multi-Field Indexes and Index Editing
  7. Table Optimization: EXPLAIN a Query
By: Marc Delisle
Rating: starstarstarstarstar / 21
September 28, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

phpMyAdmin has a number of index management options, which we will cover in this section.

Single-Field Indexes

We have already seen how the Structure panel offers a quick way to create an index on a single field, thanks to some quick links like Primary, Index, and Unique. Under the field list, there is a section of the interface used to manage indexes:

phpMyAdmin

This section has links to edit or delete every index. Here, the Field part lists only one field per index, and we can see that the whole field participates in the index.

We will now add an index on the title. However, we want to restrict the length of this index to reduce the space used by the on-disk index structure. The Create an index on 1 column option is appropriate, so we click Go. In the next screen, we specify the index details as shown in the following screen:

phpMyAdmin

Here is how to fill this panel:

  • Index name: A name we invent
  • Index type: We can choose INDEX or UNIQUE
  • Field: We select the field that is used as the index, which is the title field
  • Size: We enter 30 instead of 100 (the complete length of the field) to save space

After saving this panel, we can confirm from the following screenshot that the index is created and does not cover the whole length of the title field:

phpMyAdmin

phpMyAdminThis chapter is from Mastering phpMyAdmin for Effective MySQL Management by Marc Delisle (Packt Publishing, April 2004, ISBN 1904811035). Check it out at your favorite bookstore today.

Buy this book now.



 
 
>>> More PHP Articles          >>> More By Marc Delisle
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: