Reducing memory size and increasing speed in MySQL :
1. Use smallest datatypeWhen creating a new column in database table, we can use the smallest datatype that will hold the information expect to store. Most of the time, using INT is overkill as MEDIUMINT, SMALLINT, or TINYINT have enough range. Using a smaller datatype saves reduce the space and increases the speed.
When creating a new column in database table, we can use the smallest datatype that will hold the information expect to store. Most of the time, using INT is overkill as MEDIUMINT, SMALLINT, or TINYINT have enough range. Using a smaller datatype saves reduce the space and increases the speed.2. Declaring columns using NOT NULLWe can declare all of database columns NOT NULL unless we specifically need to store NULL values. Note - NULL is not the same as 0 or the empty string. NOT NULL reduces space and increases the speed.
We can declare all of database columns NOT NULL unless we specifically need to store NULL values. Note - NULL is not the same as 0 or the empty string. NOT NULL reduces space and increases the speed.
