Re: [sqlite] Typical suffixes of sqlite database files

2016-10-20 Thread Simon Slavin
On 21 Oct 2016, at 12:17am, Rolf Ade wrote: > What suffixes to sqlite database files do you use or see in the wild? If you're writing a general utility for SQLite databases you can not depend on anything. The two suffixes '.db' and '.dat' can mean anything at all. The Unix 'magic' utility lo

Re: [sqlite] Drop Existing Table Results in 'no such table'

2016-10-20 Thread sanhua.zh
Don't do this. I don’t think so. It is written on the sqlite.com. So it should be a tricky way but not a wrong way. All we need to do is testing enough. 原始邮件 发件人:Clemens ladischclem...@ladisch.de 收件人:sqlite-userssqlite-us...@mailinglists.sqlite.org 发送时间:2016年10月21日(周五) 14:40 主题:Re: [sqlite] Dr

Re: [sqlite] Drop Existing Table Results in 'no such table'

2016-10-20 Thread sanhua.zh
You are changing the details saved on disk but not the copy in memory. Since reopen a new connection is a ugly way, is there any other way to update the memory ? I know that sqlite3InitCallback may update it, but I can’t find a way to invoke it. 原始邮件 发件人:Simon slavinslav...@bigfraud.org 收件人:S

Re: [sqlite] Drop Existing Table Results in 'no such table'

2016-10-20 Thread Clemens Ladisch
sanhua.zh wrote: > I am trying to rename a table by editing the sqlite_master directly. Don't do this. > But I find that the ‘no such table’ error occurs while I try to drop > the renamed table. Only I close the connection or start a new > connection, the renamed table can be dropped. Re-opening

Re: [sqlite] Drop Existing Table Results in 'no such table'

2016-10-20 Thread Simon Slavin
On 21 Oct 2016, at 4:42am, sanhua.zh wrote: > I am trying to rename a table by editing the sqlite_master directly. I do > know there are a ‘ALTER TABLE … RENAME TO …’ syntax to do that. I just want > to try it in this way. > But I find that the ‘no such table’ error occurs while I try to drop

Re: [sqlite] Risk of damaging a non-sqlite file with `sqlite3 `?

2016-10-20 Thread Clemens Ladisch
Rolf Ade wrote: > If the cmd line tool sqlite3 is used, is it possible to damage a file, > given as sqlite database file argument to sqlite3? No. A database file is uniquely identified by the magic header string: It would be possible t

Re: [sqlite] Typical suffixes of sqlite database files

2016-10-20 Thread Clemens Ladisch
Rolf Ade wrote: > What suffixes to sqlite database files do you use or see in the wild? > > There are for sure > > .db (e.g. firefox) > .sqlite[23]? These are the most likely ones. But you cannot use the file name to exclude files from the selection; you have to allow all files. Regards,

Re: [sqlite] Typical suffixes of sqlite database files

2016-10-20 Thread Eric Grange
> What suffixes to sqlite database files do you use or see in the wild? .sql3 .dat On Fri, Oct 21, 2016 at 7:46 AM, Jean-Christophe Deschamps wrote: > At 01:17 21/10/2016, you wrote: > > What suffixes to sqlite database files do you use or see in the wild? >> > > I routinely/always use .sq3 but

Re: [sqlite] Typical suffixes of sqlite database files

2016-10-20 Thread Jean-Christophe Deschamps
At 01:17 21/10/2016, you wrote: What suffixes to sqlite database files do you use or see in the wild? I routinely/always use .sq3 but that's only a personal convention. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailin

[sqlite] Drop Existing Table Results in 'no such table'

2016-10-20 Thread sanhua.zh
I am trying to rename a table by editing the sqlite_master directly. I do know there are a ‘ALTER TABLE … RENAME TO …’ syntax to do that. I just want to try it in this way. But I find that the ‘no such table’ error occurs while I try to drop the renamed table. Only I close the connection or star

[sqlite] Typical suffixes of sqlite database files

2016-10-20 Thread Rolf Ade
Hello, I'm asking this for further discussion of a deficiencies of emacs sql-mode w/ sqlite databases (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23566). What suffixes to sqlite database files do you use or see in the wild? There are for sure .db (e.g. firefox) .sqlite[23]? .foss

[sqlite] Risk of damaging a non-sqlite file with `sqlite3 `?

2016-10-20 Thread Rolf Ade
Hello, I'm asking this for further discussion of a deficiencies of emacs sql-mode w/ sqlite databases (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23566). If the cmd line tool sqlite3 is used, is it possible to damage a file, given as sqlite database file argument to sqlite3? Just sqlite3 ex

[sqlite] spellfix1 is unable to match words beginning with 'Kn' and 'Gn'

2016-10-20 Thread Thomas David Baker
Is this the right list to report issues with the spellfix1 extension? Here's a complete repro case: [deepthought ~] ls -l newdb ls: newdb: No such file or directory [deepthought ~] sqlite3 newdb SQLite version 3.14.2 2016-09-12 18:50:49 Enter ".help" for usage hints. sqlite> SELECT LOAD_EXTENSION

Re: [sqlite] 2 consecutive rises in value

2016-10-20 Thread Bart Smissaert
Thanks, will give that a try as well, but I am happy with the solution form R Smith. Only one relatively simple SQL and quite fast. Took about 1.5 secs to process 5 rows. RBS On Thu, Oct 20, 2016 at 4:55 PM, Jean-Luc Hainaut < jean-luc.hain...@unamur.be> wrote: > > What about this one? > > c

Re: [sqlite] 2 consecutive rises in value

2016-10-20 Thread Jean-Luc Hainaut
What about this one? create table TABLE1(Seq integer primary key autoincrement, Id integer, Date date, Value integer); insert into TABLE1(Id,Date,Value) values(2,'2004-06-23', 42), (...), ...; select distinct T1.Id-- only one per Id from TAB

Re: [sqlite] [System.Data.SQLite] Using sqlite3.dll instead of Interop.dll - what's the trade-off?

2016-10-20 Thread John Reynolds
A follow-up on this (and a late thanks!): I've used your answer to write some build instructions for Ubuntu and Raspbian at http://blog.wezeku.com/2016/10/09/using-system-data-sqlite-under-linux-and-mono/ I've also modified the F# SQLProvider type provider so that it no longer always loads Mono

Re: [sqlite] Optimizations to recover early from D state of the process

2016-10-20 Thread Simon Slavin
On 19 Oct 2016, at 2:22pm, Rutuja Shah wrote: > I observed that the process goes into D state and takes > around 5 to 15 minutes to recover. There is nothing in SQLite that could put a process in TASK_UNINTERRUPTIBLE mode. SQLite doesn't know much about your storage system and certainly doesn

Re: [sqlite] Optimizations to recover early from D state of the process

2016-10-20 Thread Clemens Ladisch
Rutuja Shah wrote: > the process goes into D state and takes around 5 to 15 minutes to recover. There appears to be something wrong with your storage system. Are you using a local disk, without RAID, not in a VM? Regards, Clemens ___ sqlite-users maili

[sqlite] Optimizations to recover early from D state of the process

2016-10-20 Thread Rutuja Shah
Hi, Requirement 1: Data dumped to the DB every 15 minutes. One table per day, data is stored for the last 7 days. 2 such tables needed. Total number of tables - 7 days * 2 tables = 14 Average number of rows inserted per transaction (per 15 minutes per table) - 1,20,000 Requirement 2: Data dumped t