- As a developer, it is important to understand MySQL's storage engines, data types, indexing, and normalization to build high-performing applications.
- MySQL has several storage engines that handle different table types differently in terms of transactions, locking, storage, and memory usage. Choosing the right engine depends on data usage.
- Properly normalizing data, using optimal data types, and adding indexes improves performance by reducing storage needs, memory usage, and speeding up queries.
1. know more about MySQL open source database MySQL: Open Source Database 1 Salaria Software Services
2. Storage engines Schema Normalization Data types Indexes Know more about your SQL queries - Using EXPLAIN Character set and Collation Resources 2 Salaria Software Services Outline
3.
4. than try to fix a slow one after the fact!3 Salaria Software Services Why is it significant for a developerto know MySQL?
30. Cache selected columns in memory table17 Salaria Software Services taking normalization way too far
31.
32. Especially for indexed fields18 Salaria Software Services Data Types: Smaller, smaller, smaller
33.
34.
35.
36.
37.
38.
39.
40.
41. only if there is good selectivity:– % of distinct values in a column • But... each index will slow down INSERT, UPDATE, and DELETE operations 23 Salaria Software Services Indexes
47. Mix strings with different character sets or collations in the same server, the same database, or even the same table
48. Allow specification of character set and collation at any level - Mysql > SET NAMES 'utf8'; - Mysql > SHOW CHARACTER SET 28 Salaria Software Services Character set and Collation
49. Two different character sets cannot have the same collation. Each character set has one collation that is the default collation. For example, the default collation for latin1 is latin1_swedish_ci. The output for “SHOW CHARACTER SET” indicates which collation is the default for each displayed character set. There is a convention for collation names: They start with the name of the character set with which they are associated, they usually include a language name, and they end with _ci (case insensitive), _cs (case sensitive), or _bin (binary). 29 Salaria Software Services Collations have these general characteristics
50. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?phpmysql_query('SET NAMES utf8'); ?> CREATE DATABASE mydatabase DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE mytable ( mydata VARCHAR(128) NOT NULL) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; 30 Salaria Software Services How to handle Unicode (UTF-8)
51. MySQL Forge and the Forge Wiki http://forge.mysql.com/ Planet MySQL http://planetmysql.org/ MySQLDevZone http://dev.mysql.com/ High Performance MySQL book 31 Salaria Software Services Resources