Changes between Version 27 and Version 28 of InstallationGuidelines/MySQL
- Timestamp:
- 09/06/10 08:55:56 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/MySQL
v27 v28 62 62 }}} 63 63 64 Index columns which are sorted on (especially on tables with many records) [we sort by name in most dropdowns , however most of the time this field is unique & so indexed automatically]:64 Index columns which are sorted on (especially on tables with many records) [we sort by name in most dropdowns]: 65 65 * gis_location.name 66 66 * pr_person.first_name … … 75 75 }}} 76 76 77 These should already be done automatically in{{{models/zzz_1st_run.py}}}77 @ToDo: Add these to {{{models/zzz_1st_run.py}}} 78 78 == Troubleshooting == 79 Can view the list of expensive queries using: ''tbc'' 79 Can view the list of expensive queries by editing ''/etc/mysql/my.cnf'' and uncommenting/adding 80 {{ 81 log_slow_queries = /var/log/mysql/mysql-slow.log 82 long_query_time = 2 83 }} 84 and restart mysql. 80 85 86 This will log queries that take longer than 2 seconds to run. View with: 87 88 {{tail -f /var/log/mysql/mysql-slow.log}} 89 90 ---- 91 By installing 'mytop', you can see real-time status on the database 92 93 {{sudo apt-get install mytop 94 mytop -uUSERNAME -pPASSWORD}} 95 96 type 'o' to force the longest-running queries to the top of the screen. 97 ---- 81 98 == Replication == 82 99 In order to have a backup instance, configure replication from the Master node to a Backup node: