MySql

Frequently Asked MySQL Query based Interview Questions[Updated]

Question 1: How to find the second highest salary of an Employee? Answer:

Question 2: How to find duplicate records in the Employee Table? Answer:

Question 3: How to reverse the gender of each employee in a table? Answer: Suppose there is the table named users and its has columns id, first_name, last_name, gender So the SQL will be:

Question 4: How to count duplicate records in…
Read more

MySQL Table Cache

MySQL Table Cache The table cache is used to stores objects that represent tables.Each object in the cache holds associated table’s parsed .frm Each object in the cache contains the associated table’s parsed .frm file, plus other data.Exactly what else is in the object depends on the table’s storage engine. For MyISAM, it holds the table data and/or index file descriptors.The table cache can help you reuse resources.For instance, when…
Read more

MySQL Slow Query Logging

Hello Guys, Today we will discuss on monitoring slow MySQL queries logging that is the important point comes under database design. Here are the following steps Step 1: First of all, we need to open the Linux terminal and then log in on the MySQL prompt using the following command:

After hit Enter, It will ask for the root user password. After entering the correct password it will open…
Read more

Different table types in Mysql

MySQL Storage Engines There are lots of tables in Mysql table types MyISAM ISAM InnoDB BDB(Berkeley DB) Merge Heap(Memory) Archieve Blackhole CSV NDB(ndbCluster) Example Federated Here we are discussing all the table types in details below: InnoDB Storage Engine The default storage engine in MySQL 5.7. InnoDB is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data. InnoDB row-level locking…
Read more

Full Text searching in MySql

Hi Friends, Today we will discuss on the full-text searching using MySQL. First of all, we need to create columns for text searching. So I have created 2 columns for searching, address1 and address2.

To search for employee addresses  with ALL address1 and address2 in the data.

 

Heap Tables in Mysql

Hello Guys, Today we will discuss on the HEAP tables in MySQL. HEAP tables are present in memory and they are used for high-speed storage on the temporary basis.You need to specify the type while at creation. Basically, heap tables are also called memory tables.If the Mysql Database crashed then you will loose all data stored in the heap tables.

BLOB and TEXT type of data storage are not…
Read more

Exporting a mysql database

To Export a mysql database, open up terminal, making sure that you are not logged into MySQL and type:

Mysql command for database import

Hi Friends, Today we will discuss the mysql database import using the command line tool. This is the command is used for the import the data from .sql file and put into the mysql database.

Here server_name is the server name. it could be localhost or server name user_name: database user name database_name: database name where you want to import .sql file data  

Optimization WordPress Plugins & Solutions by W3 EDGE