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- >boun...@mailinglists.sqlite.org] On Behalf Of Fiona >Sent: Thursday, 12 October, 2017 20:33 >To: sqlite-users@mailinglists.sqlite.org >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 >command >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 >wanna >delete by SELECT with the same where clause. Here are the scripts. > >schema: ><http://sqlite.1065341.n5.nabble.com/file/t8403/schema.jpg> > >delete/insert operations: ><http://sqlite.1065341.n5.nabble.com/file/t8403/delete.jpg> > > > >-- >Sent from: http://sqlite.1065341.n5.nabble.com/ >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users