查詢 Index

SHOW INDEX FROM <table_name>

建立 Index

-- ALTER TABLE <table_name> ADD INDEX <index_name> (<column_name,column_name>);
ALTER TABLE people ADD INDEX fname_lname_age (firstname,lastname,age);

-- 建立也可以使用另一種寫法
-- CREATE INDEX IF NOT EXISTS <index_name> on <table_name> (<column_name,column_name>)
CREATE INDEX priority on pod_listen (priority);

建立 Unique index

-- ALTER TABLE <table_name> ADD UNIQUE INDEX <index_name> (<column_name>);
ALTER TABLE people ADD UNIQUE INDEX member (account);

刪除 Index

-- ALTER TABLE <table_name> DROP INDEX <index_name>
ALTER TABLE log DROP INDEX range_person_log


[WordPress]Your PHP installation appears to be missing the MySQL extension which is required by WordPress Error and Solution