On 04/16/2016 04:59 PM, Cecil Westerhof wrote:
> I am playing a bit with SQLite. I first had a table with 1E8 elements. When
> trying to drop this it looked like SQLite got hung. I tried it from DB
> Browser and a Java program.
> I just tried it with a table of 1E7 elements. That was dropped in about 13
> seconds.
> I will try it again with 1E8 elements, but it takes 4? hours to generated.
> Is it possible that SQLite has trouble dropping very large tables? It was
> 5.2 GB. With 1E7 elements the table is 512 MB.
>
> The definition of the table:
> CREATE TABLE testUniqueUUID (
>      UUID    blob,
>
>      PRIMARY KEY(UUID)
>      CHECK(TYPEOF(UUID) = 'blob'           AND
>            LENGTH(UUID) = 16               AND
>            SUBSTR(HEX(UUID), 13, 1) == '4' AND
>            SUBSTR(HEX(UUID), 17, 1) IN ('8', '9', 'A', 'B')
>      )
> );
>

Are there any other tables in the db with foreign keys that refer to the 
table being dropped?

If so, try with foreign keys disabled:

   PRAGMA foreign_keys = 0;

Dan.


Reply via email to