Saturday, June 30, 2012

Creating and dropping indexes in MySQL table

Advertisements

Indexes increases the speed of select queries. At the same time indexes decreases the insert query performance if there are lots of indexes in a table. How to add an index to MySQL table  and how to drop an index from a MySQL table? We will discuss both in this article.


For showing indexes in a table we can use show indexes from command. In this we can see that there is only one index that is primary index in the table based on the column employee_id

Benchmarking MySQL with mysqlslap

Advertisements

I have been checking with different tools for benchmarking a mysql server. I went through a lot of blogs and manuals and decided to use a tool named mysqlslap. In this post we will discuss how to install mysqlslap and use it. We are using Centos Linux 5.4 to test this.

Luckily mysqlslap comes with mysql-client rpm itself. With the versions 5.1.4 and above. So you can either install mysql with yum or rpm. rpms are available on mysql.com for download.

I have tested it with MySQL-client-5.5.25-1.rhel5.i386.rpm.
Just install it as 
#rpm -ivh MySQL-client-5.5.25-1.rhel5.i386.rpm
Then you will get the command "mysqlslap"

Thursday, June 28, 2012

importing csv file to MySQL database table

Advertisements


Sometimes we need to get the MySQL tables into an Excel sheet. How this can be done? We can dump the MySQL tables into a csv format file. It is explained in our previous post Dumping MySQL table into CSV file. But how to import a csv file to a mysql database table? We will discuss it in this post.



Login to your MySQL server.
[root@database ~]# mysql -p
Enter password:

Thursday, June 7, 2012

Things to consider in video streaming

Advertisements

Video streaming is gaining momentum. Nowadays nobody wants to download videos and watch. Why should we download videos if we can watch them online? But nobody can enjoy a video if it's quality is bad or if it periodically pauses for buffering etc. So every system administrators must be aware of some aspects while streaming videos. In this post we will discuss main points in streaming videos. The main aspects of video streaming are resolution, encoding, frame rate, bit rate, data rate, aspect ratio and data transfer rate.