```sql CREATE TABLE mytable ( id INTEGER AUTO_INCREMENT PRIMARY KEY, versiontime TIMESTAMP, path VARCHAR(4000), subdir VARCHAR(4000), pagename VARCHAR(500), source LONGTEXT, INDEX (versiontime, path(500)), INDEX (pagename(100)), FULLTEXT( source ) ); ``` ## Indexes See [this phoenixnap article](https://phoenixnap.com/kb/mysql-create-index). When creating a table ```sql CREATE TABLE mytable ( ..., path VARCHAR(512), INDEX( path ), INDEX( col1, col2(45) ) ); ``` and to add an index to a current table ```sql CREATE INDEX index1 on mytable( col1, col2(45) ); ALTER TABLE mytable ADD INDEX( col1, col2(48) ); ``` ## Full Text Search See FullTextSearch and [this mysqltutorial article](https://www.mysqltutorial.org/activating-full-text-searching.aspx). When Creating a table: ```sql CREATE TABLE mytable ( ..., content TEXT, FULLTEXT( content) ); ``` and to add a {FULLTEXT} index to a current table ```sql ALTER TABLE mytable ADD FULLTEXT( col1 ); ```