Interesting, because you cannot have two rows (two tile_id) for the same 
combination of tile_zoom / tile_row / tile_column since the latter are a 
required to be unique primary keys.  That is, the map table is declared as if 
it were the dictionary:

map[tile_zoom, tile_row, tile_column] = tile_id

Unless your keys are not of the correct type somewhere, it is impossible to 
have the same dictionay selectors have two results.  You need to check the 
typeof() each of your keys aka:

select *, typeof(tile_zoom), typeof(tile_row), typeof(tile_column), 
typeof(tile_id), '"' || tile_id || '"' from map where ....;

is returning duplicate rows.  You must have one of them with an incorrect 
(different) type.  Also, your tile_id could have "trailing spaces" that you 
cannot see thus counfounding your delete request (which will be shown by the 
above select).

so your delete statement is effectively:

if map[tile_zoom, tile_row, tile_column] == tile_id:
        del map[tile_zoom, tile_row, tile_column]

Have you run an integrity_check on the database to make sure it is not 
corrupted (because it certainly appears that it is).  Either that or you have 
simply inserted some bad data.

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

>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>] On Behalf Of Fiona
>Sent: Thursday, 12 October, 2017 20:33
>Subject: Re: [sqlite] Sqlite3.6 Command-line delete/update not
>working with large db file(>280GB)
>>> SQLite does none of those.  Have your program print out the actual
>it’s trying to execute.  Then try typing it manually.  See if it
>works when
>you type it by hand.
>Yes, I manually type all the command, also I check all the records I
>delete by SELECT with the same where clause. Here are the scripts.
>delete/insert operations:
>Sent from:
>sqlite-users mailing list

sqlite-users mailing list

Reply via email to