21.2. Database

From open-support.info

< Book:OTRS 3.0 - Admin Manual | Chapter 21(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Book |next=../3 |heading=21.2. |title=Database |status=draft |author=Dick6809 }} <onlyinclude>DB issues vary by the database being used. Study the documentation for your databa...")
 
Line 3: Line 3:
|heading=21.2.
|heading=21.2.
|title=Database
|title=Database
-
|status=draft
+
|editor=Dick6809
-
|author=Dick6809
+
}}
}}
-
<onlyinclude>DB issues vary by the database being used. Study the documentation for your database or check with your database administrator.  
+
<onlyinclude>__FORCETOC__
-
MySQLIf you use the MySQL table type MyISAM (which is the default), and have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB or TEXT columns), you need to defragment the datafile (tables) with the "optimize" command.  
+
DB issues vary by the database being used. Study the documentation for your database or check with your database administrator.  
 +
 
 +
== MySQL ==
 +
If you use the MySQL table type MyISAM (which is the default), and have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB or TEXT columns), you need to defragment the datafile (tables) with the "optimize" command.  
 +
 
You should try this if the mysqld daemon needs a lot of your CPU time. Optimize the tables - ticket, ticket_history and article (see Script 21.2 below).  
You should try this if the mysqld daemon needs a lot of your CPU time. Optimize the tables - ticket, ticket_history and article (see Script 21.2 below).  
 +
{{book/script
 +
|id= Script 21.2
 +
|title= Optimizing data base tables.
 +
|code=
 +
<pre>
shell$ mysql -u user -p database
shell$ mysql -u user -p database
mysql$ optimize table ticket;
mysql$ optimize table ticket;
mysql$ optimize table ticket_history;
mysql$ optimize table ticket_history;
mysql$ optimize table article;
mysql$ optimize table article;
 +
</pre>
 +
}}
 +
<br />
-
Script 21.2. Optimizing data base tables.
+
== PostgreSQL ==
-
PostgreSQLPostgreSQL is best tuned by modifying the postgresql.conf file in your PostgreSQL data directory. For advice on how to do this, see these articles:  
+
PostgreSQL is best tuned by modifying the postgresql.conf file in your PostgreSQL data directory. For advice on how to do this, see these articles:  
http://www.revsys.com/writings/postgresql-performance.html  
http://www.revsys.com/writings/postgresql-performance.html  
 +
http://varlena.com/GeneralBits/Tidbits/perf.html  
http://varlena.com/GeneralBits/Tidbits/perf.html  
 +
http://varlena.com/GeneralBits/Tidbits/annotated_conf_e.html  
http://varlena.com/GeneralBits/Tidbits/annotated_conf_e.html  
 +
If performance is still not satisfactory, we suggest that you join the PostgreSQL Performance mailing list ( http://www.postgresql.org/community/lists/ ), and ask questions there. The folks on the PostgreSQL list are very friendly and can probably help.</onlyinclude>
If performance is still not satisfactory, we suggest that you join the PostgreSQL Performance mailing list ( http://www.postgresql.org/community/lists/ ), and ask questions there. The folks on the PostgreSQL list are very friendly and can probably help.</onlyinclude>

Latest revision as of 08:09, 24 April 2011

DB issues vary by the database being used. Study the documentation for your database or check with your database administrator.

Contents

MySQL

If you use the MySQL table type MyISAM (which is the default), and have deleted a large part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB or TEXT columns), you need to defragment the datafile (tables) with the "optimize" command.

You should try this if the mysqld daemon needs a lot of your CPU time. Optimize the tables - ticket, ticket_history and article (see Script 21.2 below).

shell$ mysql -u user -p database
mysql$ optimize table ticket;
mysql$ optimize table ticket_history;
mysql$ optimize table article;
Script 21.2. Optimizing data base tables.


PostgreSQL

PostgreSQL is best tuned by modifying the postgresql.conf file in your PostgreSQL data directory. For advice on how to do this, see these articles:

http://www.revsys.com/writings/postgresql-performance.html

http://varlena.com/GeneralBits/Tidbits/perf.html

http://varlena.com/GeneralBits/Tidbits/annotated_conf_e.html


If performance is still not satisfactory, we suggest that you join the PostgreSQL Performance mailing list ( http://www.postgresql.org/community/lists/ ), and ask questions there. The folks on the PostgreSQL list are very friendly and can probably help.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox