Logo Logo Comparison: MySQL vs SQLite

Modified date: Monday, June 30, 2025

Table of Contents

General

FeatureMySQLSQLiteDefinition
introMySQL is an open source relational database management system (RDBMS) that’s used to store and manage data.SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.in their own words - but I reserved the rights to remove some bold claims like "the best", unless it is widely recognized.
vendorOracleSQLite Team
initial release19952000
latested version93.5We don't put a release date here as the software is patching frequently. So tracking it is not much useful.
db-engines ranking210ranks from https://db-engines.com/en/ranking (06/25)
relational?yesyesIs it a relational database? (1) Most database are actually with some extensions, for example, nested data types, graph support, etc, which we usually called "multi-model". (2) Some of them are product family, meaning they have more than one database. Here we focus on the main one but explain others when needed.
open source?yesyesmainly the engine code
license

commerical, GNU

a dual-license model: an open-source license (GPL) and commercial licenses

no license is needed

The core SQLite database software is in the public domain. No license is necessary to use SQLite or to build SQLite into your products.
price: box software

$0 ~ $32,100 (2023)

MySQL pricing by edition (annual subscriptions): (1)Community Edition: Open-source and free — from $0 (2) Standard Edition: Starts at $2,140/year for a two-core server; can scale up to $12,840/year as you add more cores portable.io (3) Enterprise Edition: Starts at $5,350/year for two cores; increases up to $32,100/year depending on core count

0

free download
on-premise offeringyesyesif no means you can't buy "box" software from them
cloud offeringNone

None

It is mainly in embedded usage.
technical dochttps://dev.mysql.com/doc/https://www.sqlite.org/docs.html
supported platformsAndroid, *BSD, iOS, Linux, Mac, Solaris, VxWorks, and Windowssupported OS/CPU platforms

Data Types

FeatureMySQLSQLiteDefinition
int: signessbothif differentiate signed and unsigned int
int: 1-bytes int nametinyint

int

SQLite accepts names like TINYINT, SMALLINT, BIGINT, but only as type names. They’re purely aliases — they have no effect on storage size or strict typing, they will all converted to INTEGER type. Since the actual storage size is value-by-value basis, so the INT type you specified does not have any effect: it will pick up 0,1,2,3,4,6,8 bytes for your value.
int: 2-bytes int namesmallintint
int: 3-bytes int namemediumint
int: 4-bytes int nameintint
int: 8-bytes int namebigintint

SQL

FeatureMySQLSQLiteDefinition
SQL: standard complaincemediummedium
PL: mainSQL + SPmain programming lanage: most database suports SQL because SQL is a well established standard. However, each database would like to extend SQL more or less.
PL: other language supportnoPL lanaguage other than PL/SQL, like PL/Java, PL/Rust etc
Object-Relational?no
vector searchno nativedoes it support vector search

Storage and System

FeatureMySQLSQLiteDefinition
arch: serverC/SEmbeddedEmbedded or traditional C/S?
arch: run in browser?noyesIt also known as a client-side database, is a database that is stored and managed within a user's web browser, rather than on a remote server.
arch: Multi-master support?noif multi-master support?
arch: primary/read replica?yesif primary + mulitiple read replica supported
replication: sync/asyncbothCan commits wait or w/o wait for replicas to acknowledge
ACID

yes/atomic DDL (non-transactional)

Atomic DDL is not transactional DDL. DDL statements, atomic or otherwise, implicitly end any transaction that is active in the current session, as if you had done a COMMIT before executing the statement. This means that DDL statements cannot be performed within another transaction, within transaction control statements such as START TRANSACTION ... COMMIT, or combined with other statements within the same transaction.
for DML and DDL
ACID: durabilityyesyes
Materialized View: support?nono

Benchmarking

FeatureMySQLSQLiteDefinition
any official TPC benchmarks?nonoThe TPC benchmark includes a set of tests simulating real-world scenarios to evaluate database performance.

Tools

FeatureMySQLSQLiteDefinition
command line clientmysqlsqlite3it means "sql client" for database supporting SQL. For embedded atabase, the client includes the server together.
admin(GUI)MySQL workbench

Export Regulations

Both are open source databases, so they are easy with export regulations.

FeatureMySQLSQLiteDefinition
JurisdictionUSUSWhich country controls export
ECCNNoneNone or EAR99An Export Control Classification Number (ECCN) is a five-character alphanumeric code used to categorize items on the Commerce Control List (CCL) for export control purposes. Most database may fall into 5D992.c category, "mass market encryption", which means it has some ordinary encryption related code, for example, the SSL connection code.
Eligible License Exception / CCATS

Not required

There is no ECCN for open source software

Not required

There is no ECCN for open source software
A License Exception is an authorization that allows you to export or reexport items subject to the EAR without needing to obtain a specific export license, provided certain conditions are met. CCATS stands for Commodity Classification Automated Tracking System. The BIS assigns a CCATS number to products that it has classified under the Commerce Control List (CCL).
Encryption ComponentsSSLSQLite Encryption Extension (SEE), SSLCrypto functionality that triggers control

Internal

FeatureMySQLSQLiteDefinition
concurrency controlInnoDB: MVCC
MVCC: implemented?yesif implement MVCC for concurrency control
MVCC: rollback segment

yes

MySQL supports multiple storage engines, with InnoDB is popular. So we focus on InnoDB here.
if uses rollback segment (RS) to store old versions. Without RS, old versions and new versions are mixed stored, then the database engine has to find a way to efficiently drop the old versions at certain point.
Implementation languageC++A DBMS may use mulitple programming languages, for example, supports its stored procedure. The major programming language used to implement the engine.

Internal - Optimizer

FeatureMySQLSQLiteDefinition
CBO?yesif it employees a cost based optimizer
frameworkSystem-RSystem-R is more like a dynamic programming, bottom up optimizer, while Cascades/Volcano gebaseerd optimizer is more like top-down optimizer.
stats: multi columnnoMulti-column stats may cause storage space bloat: for example, if one dimension has 100 buckets, then three dimensions will require 1M buckets - but reducing the total number of buckets will result in reduced accuracy.
plan guide?noCan we use plan guide to correct the plan? This is a more systematic and accurate way to repair the plan than plan hints. Especially during system upgrades, if the plan becomes worse, we can use plan guide to force a query to use a previous plan.

Internal - Runtime

FeatureMySQLSQLiteDefinition
spilling supportyes"spilling" refers to the process of writing temporary data or intermediate results of a query to disk when the available memory is exhausted. This is crucial for handling large datasets or complex queries that require more memory than available.
modelVolcanoThe operator scheduling model: pull-gebaseerd (Volcano), push etc.
support intra-parallel query?nomeaning a single query can utilize multi hardware threads to run it
adaptive execution (AQP)?noTraditionally, after the optimizer determines the plan, the runtime must execute it completely without any room for adjustment, such as which of the two tables should be built. The adaptive method allows the runtime to make some adjustments based on the actual situation, and the optimizer must also prepare for this uncertainty, such as preparing an alternative plan.
vectorization

no native.

HeatWave supports it (not open source).
Speed ​​up OLAP queries using vectorized execution. A vectorized runtime exchange a bunch of rows between iterators, and these rows are physically sotre with column-oriented order.
iterator: join methodsexcept MJHash Join (HJ), Sort-Merge Join (MJ) and Nested loop Join (NLJ) are 3 major ones
Error: out-of-range and overflowstrict mode: abort. Non-strict mode: continue with warning.To maintain atomic requirement of ACID, database engine usually fail the statement and abort the transaction.

Internal - Storage Engine

FeatureMySQLSQLiteDefinition
Page Size

4K, 8K, 16K, 32K, 64K

Every tablespace in a MySQL instance has the same page size. By default, all tablespaces have a page size of 16KB; you can reduce the page size to 8KB or 4KB by specifying the innodb_page_size option when you create the MySQL instance. You can also increase the page size to 32KB or 64KB.
The physical disk block size for storage and I/O.
Storage CompressionROW_FORMAT=COMPRESSED
ACID: durability mechanismInnoDB: WALWALHow is it implements durability. Database's classic way is write ahead logging (WAL).