Category Archives: My SQL

CURTIME() Vs NOW()

CURTIME() returns the TIME part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested

Example

mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)

The difference between MySQL CURTIME() and NOW()

CURTIME() returns the TIME part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested

Example

mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)

MySQL CURDATE() Vs NOW()

CURDATE() returns the DATE part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested

Example

mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)

The difference between MySQL CURDATE() and NOW()

CURDATE() returns the DATE part of the current time.
NOW() returns the date and time portions as a timestamp in various formats, depending on how it was requested

Example

mysql> SELECT NOW(),CURDATE(),CURTIME();
+———————+————+———–+
| NOW() | CURDATE() | CURTIME() |
+———————+————+———–+
| 2012-06-18 14:14:01 | 2012-06-18 | 14:14:01 |
+———————+————+———–+
1 row in set (0.03 sec)

BLACKHOLE storage engine

The BLACKHOLE storage engine accepts data but does not store anything . So on retrieval it will return nothing .

When we create BLACKHOLE table the server will create file with name starts with table name with extension .frm . No other tables will be generated as it stores nothing .

It supports all types of indexes .

Though nothing is stored , the query statements get stored if binary logs are enabled .

It does not support AUTO INCREMENT

CSV Storage Engine

The ARCHIVE storage engine is used for storing large amounts of data without indexes in a very small footprint.

When you create an ARCHIVE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. The storage engine creates other files, all having names beginning with the table name. The data and metadata files have extensions of .ARZ and .ARM, respectively. An .ARN file may appear during optimization operations.

The ARCHIVE engine supports INSERT and SELECT, but not DELETE, REPLACE, or UPDATE. It does support ORDER BY operations, BLOB columns


ARCHIVE Storage Engine

The ARCHIVE storage engine is used for storing large amounts of data without indexes in a very small footprint.

When you create an ARCHIVE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. The storage engine creates other files, all having names beginning with the table name. The data and metadata files have extensions of .ARZ and .ARM, respectively. An .ARN file may appear during optimization operations.

The ARCHIVE engine supports INSERT and SELECT, but not DELETE, REPLACE, or UPDATE. It does support ORDER BY operations, BLOB columns

FEDERATED Storage Engine

It is a storage engine that accesses data in tables of remote databases rather than in local tables.The FEDERATED storage engine is available beginning with MySQL 5.0.3.
This storage engine enables data to be accessed from a remote MySQL database on a local server without using replication or cluster technology. When using a FEDERATED table, queries on the local server are automatically executed on the remote (federated) tables. No data is stored on the local tables.