* You are viewing the archive for the ‘MySql’ Category

PHP MySql fetch_assoc Vs fetch_array Vs fetch_object performance difference

In this post we will see how these 3 main MySql data fetching methods in PHP performance.

In almost all php-mysql programming, you will need to fetch data from database to populate your applications with data.

There are 3 most popular methods of getting more than one data set when fetched.

mysql_fetch_assoc() : This function fetch an associative array of data.
mysql_fetch_array() : This function returns a combination array of associative elements as well as data with numerical index.
mysql_fetch_object() : This function returns an object with properties that correspond to the fetched row.

Each data set contains a unique id element, int & a … Continue Reading

MySQL 5.6 was released as GA today

MySQL 5.6 was released as GA today. Congratulations to the team at Oracle!


There are lots of long desired features in 5.6, including global transaction ids, multi-threaded slaves, and more.

We are still using MySQL 5.1, but are working on porting our patch-set to MySQL 5.6. We are also starting to file bugs on the features we are testing for 5.6:


What’s the Maximum Length For MySQL TEXT Field Types

MySQL engine supports 4 TEXT field types


MyISAM tables in MySQL have a maximum size of a row of 65,535 bytes, so all the data in a row must fit within this limit.
However, the TEXT types are stored outside the table itself and only contribute 1 to 4 bytes towards this limit.

TEXT data types are also able to store much more data than VARCHAR and CHAR text types so TEXT types are what you need to use when storing web page or similar content in a database.

The maximum amount of data that can be stored in each data type is as … Continue Reading

What are the different tables(Engine) present in MySQL, which one is default?

Following tables (Storage Engine) we can create:
1. MyISAM(The default storage engine IN MYSQL Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the table format. The data file has an .MYD (MYData) extension. The index file has an .MYI (MYIndex) extension. )
2. InnoDB(InnoDB is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data.)
3. Merge
4. Heap (MEMORY)(The MEMORY storage engine creates tables with contents that are stored … Continue Reading