Hey,
The database has 4 tables but the other 3 are tiny in comparison (they hold user preferences etc....).
There is only 1 index defined on the table.... I am not an expert in Database design so I am not sure if this is good or bad... should I be defining more indexes?
I get the impression that the queries are running a bit slow... I can browse pages of the site very fast, but as soon as you arrive on a page which is making database requests, the page takes a bit longer to load.... however... I have noticed that phpMyAdmin and my wordpress blog both run very fast and so is it possible that I have done some sloppy coding? Or does phpmyadmin cache database info?
This is the output of the EXPLAIN:
Code:
+-------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| timestamp | int(10) unsigned | NO | | NULL | |
| code | varchar(10) | NO | | NULL | |
| owner | int(10) unsigned | YES | | NULL | |
| title | varchar(255) | YES | | NULL | |
| description | text | YES | | NULL | |
| author | varchar(100) | YES | | NULL | |
| location | varchar(255) | YES | | NULL | |
| hash | varchar(128) | YES | | NULL | |
| text | int(10) unsigned | YES | | 0 | |
| file | int(10) unsigned | YES | | 0 | |
| expiry | int(10) unsigned | YES | | NULL | |
| views | int(10) unsigned | YES | | NULL | |
| password | varchar(128) | YES | | NULL | |
| ip | varchar(12) | YES | | NULL | |
| origin | tinyint(3) unsigned | NO | | NULL | |
| type | tinyint(3) unsigned | YES | | NULL | |
| encrypted | tinyint(4) | NO | | 0 | |
| client | varchar(255) | YES | | NULL | |
+-------------+---------------------+------+-----+---------+----------------+
I really appreciate your help
Ty
Bookmarks