Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Why should we keep column as NOT NULL instead of NULL in MySQL?

Keep table column as NOT NULL instead of NULL except in some special cases. This statement is cited by many articles of MySQL optimization, but they don't say why we should do this. Here we discuss about this.First why are there many people using NULL when defining table? The reasons may be:NULL the the default when defining table, the rookies or people who don't want to have much troubles will keep this default settingMany people think NOT NULL will require more spaceMany people don't want to verify the data before inserting or updating, it's more convenient when writing SQL queries.There are...

4,010 0       MYSQL REASON NULL


  How to optimize MySQL insert statement

For a big data system, one problem is the data access efficiency, one more problem is that the data insertion is very slow. We had a service system, the data loading process would take 4-5 hours. This time consuming operation is risky since if the program is interrupted during the loading process, it might be rerun, this will be troublesome. So it's necessary to improve the insertion efficiency for big data systems.Here we provide two optimization suggestions.1. Combine multiple insert statementCommon insert statement use is:INSERT INTO `insert_table` (`datetime`, `uid`,&nb...

9,085 0       MYSQL OPTIMIZATION INSERT


  How does MySQL handle DROP TABLE

A few days ago, when executing DROP TABLE in MySQL, all processes including DDL and DML were hung until DROP TABLE was completed. I am confused about this phenomenon.I have reviewed the source codes of MySQL to check how MySQL internally handle DROP TABLE.When user trigger DROP TABLE command:########################MySQL SERVER drop table########################/* Sql_table.cc  delete (drop) tables. */bool mysql_rm_table( )  /*   Execute the drop of a normal or temporary table */  int mysql_rm_table_part2 ()    /* Remove matching tables from the HANDLER&...

4,024 1       MYSQL DROP TABLE


  Configure a PHP web server on CentOS

Are you used to use cPanel or Plesk on VPS for your PHP website management? If for some reason you don't want to use them? What can you do? How do you maintain your website? How do you access Emails, use FTP to upload files or use phpMyAdmin to manage your databases? You may need to configure all these services yourself on a VPS without cPanel or Plesk or other similar apps.But to configure all these services on a Linux server is not an easy job. You may spend many nights but still fail to get satisfactory results. Here I share with you some useful links which can help you to configure a worki...

5,547 0       EMAIL MYSQL CRON LINUX FTP CENTOS


  Work with MySQL character set and collation

For non-English websites, they often have to deal with character set and collation if they want to store data to and read data from databases with other languages. Character set tells the database which kind of character encoding scheme to use to store or read data, collation can be simply understood as a subset of character set, it tells the database how to sort data. We talk about working with character set and collation of MySQL today.  In MySQL, if we want to store Chinese, Japanese or other languages other than English, we may need to set the relative character set for the database, ...

11,162 0       MYSQL CHARACTER SET COLLATION CHINESE QUESTION MARK


  A serious security vulnerability found in MySQL/MariaDB

Recently a serious security vulnerability was found in MySQL/MariaDB. It relates to the access to the database. The issue is described below.When a user connects to MariaDB/MySQL, a token (SHA over a password and a random scramble string) is calculated and compared with the expected value. Because of incorrect casting, it might've happened that the token and the expected value were considered equal, even if the memcmp() returned a non-zero value. In this case MySQL/MariaDB would think that the password is correct, even while it is not.  Because the protocol uses random strings, the probab...

5,414 0       MYSQL BUG PASSWORD FIX MARIADB MEMCMP()


  Create Packed Indexes with MySQL

I am pretty much sure that you are aware of indexes which we are creating on database fields. Indexes are very useful to make your query search faster and improve the site performance. But the fact is that Indexes which we are creating on database tables also require some additional space on your hard disk and if you have not properly created these indexes than some times your index size become more than your actual data size.Now what if you can compress indexes which you have ...

5,785 0       MYSQL COMPRESSED INDEX PACK_KEYS


  8 most successful open source products

Open source itself is a successful product. It is not only liked by many personals, many famous enterprises like itAlthough there are numerous open source projects and open source products, which is the most successful among them? "Success" is defined as the widely used + well known here. In many successful open source products, only a minority leaders. Here we share 8 most successful open source products we think they deserve to be.LinuxReason: Linux + GNU = GNU / Linux. It has been almost 20 years since Linus Torvalds created a new OS kernel based Minix. During this time, most network server...

7,933 1       OPEN SOURCE MYSQL LINUX BIND BSD