Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-16 Thread Fiona
>>The setting for synchronous is basically what level of safety net do you want if it dies in the middle of something. Setting it to off shouldn't cause any corruption if things go well, it should only come into play if you saw errors or didn't close things down correctly etc. You're right, my

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-15 Thread Fiona
Thanks a lot! That may be the problem: my db file is corrupted. Below is the *PRAGMA integrity_check* result. It didn't return OK. I think it's because I set PRAGMA synchronous=off in Python code to enhance insert speed. Does

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-15 Thread Fiona
>>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. Thanks for noticing that problem! Follow your instructions, now I'm sure it's all because my db file is

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-15 Thread Fiona
>> Swapping the columns tile_data and tile_id may improve performance significantly, especially if the BLOB can get bigger than a database page. Thanks for your advice, could you please explain more why is that? The primary key is not change at all, what exectly causes the improvement? --

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-15 Thread Fiona
>> SELECT typeof(tile_id), tile_id FROM map WHERE zoom_level=18 AND tile_column=214233 AND tile_row=147702; tile_id is text type -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Fiona
>> 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.

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-13 Thread Fiona
Sorry about my ambiguous description. Here is what I wanna do. Normally I use Python code to insert/update data of two tables in my sqlite database file: *map and images*, table *map* stores the indexs of pics, while table *images* stores the contents of these pics. My Python code works well,

Re: [sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-12 Thread Fiona
>> This suggests INSERT works but UPDATE and DELETE does not. Is this >> correct ? Thanks a lot! Yes, that's the situation. I'm using WHERE clause in my UPDATE/DELETE sentences, and I'm pretty sure the syntax and my shell are not the problem, because there has no retrun of error, and I also

[sqlite] Sqlite3.6 Command-line delete/update not working with large db file(>280GB)

2017-10-12 Thread Fiona
Here is the specifics of my problem: ubuntu, sqlite 3.6.20 I have only two tables, each with primary key and index, I use python code to insert/update these two data, one table have a column with large blob data. Now I have a db file of about 289GB in size, when I updata/delete with