Tag: mysql

MySQL UTF-8

Problem: I have a database that needs to accommodate all languages.  Currently it is set to the default latin1_swedish_c1.  I’m thinking I need to change it to UTF8, but there are so many UTF8 encodings!   Solution: “_cs” is for case

Tagged with:

MySQL Query Examples

MySQL examples and queries: http://www.artfulsoftware.com/infotree/queries.php This great resource showed me a simple way to pivot in MySQL.  If you have the following tables: CREATE TABLE `project` ( `project_id` int(11) NOT NULL auto_increment, `name` varchar(50) NOT NULL, PRIMARY KEY (`project_id`), )

Tagged with:

VARCHAR vs TEXT Performance

Ever wonder if VARCHAR(255) or TEXT is a better data type?  This thread suggests VARCHAR(255) is better because it is allowed to use MEMORY (or RAM).  The TEXT data type is not allowed in there. http://forums.mysql.com/read.php?24,105964,105964#msg-105964   Although it was

Tagged with: ,

Optimize MySQL using EXPLAIN

If you need to optimize or find out how a MySQL query is doing, type in “EXPLAIN” before the query and you’ll get a table that shows a bunch of statistics.  I’m not going to try to explain them all.

Tagged with:
Top