mSQL
mSQL
should be quicker at:
INSERT
operations into very simple tables with few columns and keys.
CREATE TABLE
and DROP TABLE
.
SELECT
on something that isn't indexed. (A table scan is very
easy.)
mSQL
(and
most other SQL implementations) on the following:
SELECT
operations.
VARCHAR
columns.
SELECT
with many expressions.
SELECT
on large tables.
mSQL
, once one
connection is established, all others must wait until the first has
finished, regardless of whether the connection is running a query
that is short or long. When the first connection terminates, the
next can be served, while all the others wait again, etc.
mSQL
can become pathologically slow if you change the order of
tables in a SELECT
. In the benchmark suite, a time more than
15,000 times slower than MySQL Server was seen. This is due to mSQL
's
lack of a join optimiser to order tables in the optimal order.
However, if you put the tables in exactly the right order in
mSQL
2 and the WHERE
is simple and uses index columns,
the join will be relatively fast.
See section 5.1.4 The MySQL Benchmark Suite.
ORDER BY
and GROUP BY
.
DISTINCT
.
TEXT
or BLOB
columns.
GROUP BY
and HAVING
.
mSQL
does not support GROUP BY
at all.
MySQL Server supports a full GROUP BY
with both HAVING
and
the following functions: COUNT()
, AVG()
, MIN()
,
MAX()
, SUM()
, and STD()
. COUNT(*)
is
optimised to return very quickly if the SELECT
retrieves from
one table, no other columns are retrieved, and there is no
WHERE
clause. MIN()
and MAX()
may take string
arguments.
INSERT
and UPDATE
with calculations.
MySQL Server can do calculations in an INSERT
or UPDATE
.
For example:
mysql> UPDATE SET x=x*10+y WHERE x<20;
SELECT
with functions.
MySQL Server has many functions (too many to list here; see section 6.3 Functions for Use in SELECT
and WHERE
Clauses).
MEDIUMINT
that is 3 bytes long. If you have 100 million
records, saving even 1 byte per record is very important.
mSQL2
has a more limited set of column types, so it is
more difficult to get small tables.
mSQL
stability, so we cannot say
anything about that.
mSQL
, and is also less expensive
than mSQL
. Whichever product you choose to use, remember to
at least consider paying for a license or e-mail support.
mSQL
with
some added features.
GPL
and commercial).
mSQL
has a JDBC driver, but we have too little
experience with it to compare.
GROUP BY
, and so on are still not implemented in mSQL
, it
has a lot of catching up to do. To get some perspective on this, you
can view the mSQL
`HISTORY' file for the last year and
compare it with the News section of the MySQL Reference Manual
(see section D MySQL Change History). It should be pretty obvious which one has developed
most rapidly.
mSQL
and MySQL Server have many interesting third-party
tools. Because it is very easy to port upward (from mSQL
to
MySQL Server), almost all the interesting applications that are available for
mSQL
are also available for MySQL Server.
MySQL Server comes with a simple msql2mysql
program that fixes
differences in spelling between mSQL
and MySQL Server for the
most-used C API functions.
For example, it changes instances of msqlConnect()
to
mysql_connect()
. Converting a client program from mSQL
to
MySQL Server usually requires only minor effort.
mSQL
Tools for MySQLmSQL
and MySQL Client/Server Communications Protocols DiffermSQL
2.0 SQL Syntax Differs from MySQL