On Thursday, 31 October, 2019 03:51, Thomas Kurz <sqlite.2...@t-net.ruhr> wrote:

>I experimentally imported the same data into a MariaDB database and tried
>the same operation there (without paying attention to creating any
>indexes, etc.). It takes only a few seconds there.

According to the MariaDB reference manual, it does not "do anything" with 
references clauses on columns.  They are merely for entertainment purposes.  
You have to use the table constraint syntax to declare enforceable foreign key 
constraints, which means you cannot use the same CREATE TABLE syntax for 
MariaDB as for SQLite3.

From https://mariadb.com/kb/en/library/create-table/

Note: MariaDB accepts the REFERENCES clause in ALTER TABLE and CREATE TABLE 
column definitions, but that syntax does nothing. MariaDB simply parses it 
without returning any error or warning, for compatibility with other DBMS's. 
Before MariaDB 10.2.1 this was also true for CHECK constraints. Only the syntax 
for indexes described below creates foreign keys.

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to