[sqlite] Question about the list

2015-06-19 Thread Simon Slavin
On 19 Jun 2015, at 3:14am, david at andl.org wrote: > Some of the messages I receive have been cross-posted to two lists (eg from > jkl): > > sqlite-users at mailinglists.sqlite.org > sqlite-users at sqlite.org > > When I reply, the first list accepts my post and the second bounces it. That >

[sqlite] Problems in reading a record containing a blob

2015-06-19 Thread Simon Slavin
On 17 Jun 2015, at 5:59pm, Sivananda Nyayapathi wrote: > I am able to store the image in the blob field. However, while attempting to > read, I get the following error two times (as seen in the LogCat entries): > > W/CursorWindow(26737): Window is full: requested allocation 3184896 bytes,

[sqlite] SourceForge seems to have grabbed the "sqlite" project there

2015-06-19 Thread Simon Slavin
On 4 Jun 2015, at 2:20am, justin at postgresql.org wrote: > Good point. As long as they don't start bundling their adware crap > with it, it's probably not really hurting anything. The policy that had them host third-party work was reversed yesterday. The sourceforge page for SQLite now just

[sqlite] A story of breaking the encryption of a SQLite database

2015-06-21 Thread Simon Slavin
For those of you who might be interested in a high-tech attempt at busting SQLCipher encryption: Please note that the breaking of the encryption was not done by examining the database itself. SQLiteCipher is not part

[sqlite] sqlite error code 1034

2015-06-23 Thread Simon Slavin
On 23 Jun 2015, at 1:33am, Mayank Kumar (mayankum) wrote: > We once in a while see the following errors returns by sqlite for a database > created on nvram. I am trying to understand, how are other users handling > this error ? if fsync fails and sqlite api fails because of this issue, does

[sqlite] sqlite error code 1034

2015-06-23 Thread Simon Slavin
On 23 Jun 2015, at 6:01am, Mayank Kumar (mayankum) wrote: > Do you think if sqlite3_step or sqlite3_open fail with this error, we should > treat this as transaction committed and ignore the fsync error and it will be > retried with the next commit or read and eventually will sync unless I

[sqlite] SQLite PENDING lock before SHARED lock with WAL enabled

2015-06-23 Thread Simon Slavin
On 23 Jun 2015, at 9:49am, Harmen de Jong - CoachR Group B.V. wrote: > Is there anyone who can confirm that the first read transaction with WAL > enabled locks the database because it triggers the SchemaLoaded? The sqlite3_open() commands do not actually open the file. They don't even make

[sqlite] sqlite error code 1034

2015-06-23 Thread Simon Slavin
On 23 Jun 2015, at 8:49pm, Mayank Kumar (mayankum) wrote: > Thanks all for the useful inputs. One more question I have is can the 1034 > error code ever mean that disk is full or nvram is full and hence it cannot > fsync ? The error for 'disk full' should never happen at fsync(). It should

[sqlite] Worstcase consequence of exotic storage failure, and how guard against it?

2015-06-25 Thread Simon Slavin
On 25 Jun 2015, at 11:49am, Mikael wrote: > Harddrives can fail in the most remarkable, surprising ways imaginable, as > for instance reflected on > https://www.usenix.org/legacy/events/fast08/tech/full_papers/bairavasundaram/bairavasundaram_html/index.html > and

[sqlite] sqlite's wal mode support rollback?

2015-06-26 Thread Simon Slavin
On 26 Jun 2015, at 2:06am, Wei, Catherine wrote: > I'm using the wal mode for my sqlite database. I have a problem > that since there's no copy of database file in wal, how does it support > transaction rollback if something bad happened to the database? Can wal > promise the data

[sqlite] RemovableStorage in UWP for SQLite database - sqlite3_open_v2 issue

2015-06-29 Thread Simon Slavin
On 29 Jun 2015, at 7:29am, Juan Pablo Garc?a Coello wrote: > Thank you for your really specific answer, I will go to the IoT forum, > insider, etc to make the request. Don't bother. They won't change it. The inability to access these places is intentional. It means that programs can't

[sqlite] Tables and Columns of Database of Whatsapp

2015-06-29 Thread Simon Slavin
On 28 Jun 2015, at 1:24pm, bob_sqlite at web.de wrote: > I teach pupils SQL in school. > > I want to create exercises about the SQLite database of Whatsapp. > > Can you tell me the names of tables and the names of columns? Open the database in the SQLite command-line tool and issue this

[sqlite] Tables and Columns of Database of Whatsapp

2015-06-30 Thread Simon Slavin
On 30 Jun 2015, at 4:47am, Darko Volaric wrote: > If it's being used for teaching it can also be fair use: ( from > http://www.teachingcopyright.org/handout/fair-use-faq ) > > "the court found that the biographer's use was fair, in part because the > biographer's purpose was to educate and

[sqlite] Question about getting size of stored data

2015-06-30 Thread Simon Slavin
On 30 Jun 2015, at 1:44pm, m.g.001 wrote: > I tried the following, but it returns different sizes every time. But my > test data is the same so I think it should have the same size. What do you mean by "my test data is the same" ? Are you saying you have a table with two rows which have

[sqlite] Sqlite and threads/multiple applications

2015-03-01 Thread Simon Slavin
On 1 Mar 2015, at 9:22am, Olivier Vidal wrote: > looking at this list , I wonder if > there is an operating system to favour with Sqlite. Operating systems aren't a problem. Chose whatever OS you like based on other considerations. The same is true

[sqlite] Does length() use strlen() on blobs?

2015-03-01 Thread Simon Slavin
On 1 Mar 2015, at 6:40pm, David Barrett wrote: > I'm wondering if I insert > a string into that blob if it'll return the blob length or the string > length. You can put a value of any type into a column of any affinity. i.e. you can put a BLOB into a BLOB column or a string into a BLOB

[sqlite] Why bind indexes start from 1 and column indexes start from 0?

2015-03-02 Thread Simon Slavin
On 2 Mar 2015, at 12:23am, Jay Kreibich wrote: > Every database I?ve every used starts SQL parameter indexes from 1. I?m not > sure it is part of the SQL standard, but it is more or less the defacto > standard of SQL APIs, and might be considered part of the SQL language. I hope the SQLite

[sqlite] PRAGMA Synchronous safety

2015-03-02 Thread Simon Slavin
On 2 Mar 2015, at 4:45pm, Doug Nebeker wrote: > 1. Is setting synchronous to FULL necessary to prevent these corruption > problems? You should not be getting this corruption problem, so I don't know whether FULL would cure it. > 2. NORMAL is much slower than NONE. Is FULL much slower than

[sqlite] full table scan ignores PK sort order?

2015-03-03 Thread Simon Slavin
On 3 Mar 2015, at 10:59am, Jean-Christophe Deschamps wrote: > An SQL engine doesn't guarantee any row "order" unless you explicitely force > an ORDER BY clause. Think of row order as random, where rowid order is just a > possibility among zillions others. Of course neither SQLite nor other

[sqlite] Multi-table index ersatz?

2015-03-03 Thread Simon Slavin
On 3 Mar 2015, at 11:10am, Eric Grange wrote: > With indexes on A & B, the performance of the above is not very good, as > indexing A1 is not enough, and indexing B1 is not enough either, so no > query plan is satisfying. The B1 index isn't going to be used. Here is your query: select

[sqlite] PRAGMA Synchronous safety

2015-03-03 Thread Simon Slavin
On 2 Mar 2015, at 10:32pm, Doug Nebeker wrote: >> Are you using any PRAGMAs apart from "PRAGMA synchronous" ? > > PRAGMA temp_store=1 (file) > PRAGMA cache_size=2000 > PRAGMA page_size=4096 > sqlite3_soft_heap_limit( 1GB ) > > Those are the only non-default settings. I see nothing in there

[sqlite] SQLite error(5): database is locked in System.Data.SQLite

2015-03-04 Thread Simon Slavin
On 4 Mar 2015, at 1:45pm, Hick Gunter wrote: > Only one writer may be active at any one time. The other(s) will recieve an > error return status. You can either wait a while and retry this in your > application or set a busy timeout to handle the "usual" cases for you. Agreed. The default

[sqlite] Corrupted database

2015-03-04 Thread Simon Slavin
On 4 Mar 2015, at 9:07pm, Scott Hess wrote: > In the time I've been involved with high-volume SQLite clients (Google > Gears, then Chrome), what I've found is that the corruption invariably > (*) ends up being a case where distinct pages were not written > atomically, but where each page in

[sqlite] Corrupted database

2015-03-05 Thread Simon Slavin
> On 5 Mar 2015, at 7:28am, Alexandr N?mec wrote: > > Hi Simon, > >> Does SQLite automatically detect and uncorrupt these problems the next time >> it opens the database, >> or has something been done to the hardware to break in-order writing ? > > No. The database can be opened

[sqlite] db File Remains Open After Connection is Closed

2015-03-05 Thread Simon Slavin
> On 5 Mar 2015, at 8:34pm, RNACS - Info wrote: > > The code I am using is: > >' Close license database connection >If Not IsNothing(SQLconn) Then >If SQLconn.State <> ConnectionState.Closed Then >SQLconn.Close() >End If >

[sqlite] db File Remains Open After Connection is Closed

2015-03-05 Thread Simon Slavin
On 5 Mar 2015, at 9:23pm, RNACS - Info wrote: > Does not help. I put a breakpoint at the "SQLconn = Nothing" statement & > checked the value of SQLconn.State. It was "Closed", so I continued one & > still got the error. Okay. Worth checking. I'm afraid I don't know your API well enough to

[sqlite] fts4 support in distributions of SQLite?

2015-03-07 Thread Simon Slavin
On 7 Mar 2015, at 5:42am, Darren Spruell wrote: > It uses SQLite and the records have a > comments field for which I'd like to use a fts4 vtable to enable > search. It sounds like you're using fts4 for just one function and you may be able to do without fts entirely. Here are three questions

[sqlite] error "attempt to write a readonly database"

2015-03-07 Thread Simon Slavin
On 7 Mar 2015, at 4:42pm, Paul Sanderson wrote: > I have a database I have created and populated with various tables and data. > > I now want to create a new table and I get the above error. > > command is create table testtab (id int, data blob); If you are not already doing so, try using

[sqlite] Can I copy one column of data to another table?

2015-03-07 Thread Simon Slavin
On 7 Mar 2015, at 4:42pm, Dave wrote: > I am fairly new at this although I have wanted to learn and tried again and > again...But I have a problem. I created a database and probably did it wrong > and I am trying to fix it. I made a database with 7 tables in it all with a > primary key and a

[sqlite] error "attempt to write a readonly database"

2015-03-07 Thread Simon Slavin
On 7 Mar 2015, at 7:31pm, Paul Sanderson wrote: > I'm an idiot - dev environment was running as admin - so nothing else > could write to DB out side of this as a normal users. A mistake we've all made. Glad you figured it out. Simon.

[sqlite] famous users of SQLite

2015-03-08 Thread Simon Slavin
You can add Sony to the list on (presuming they don't object). While diagnosing a problem with a Sony Bravia I found it necessary to dump the information stored on the internal Flash storage. There are files there which have extension .sdb and have the

[sqlite] Question about ON DELETE CASCADE

2015-03-09 Thread Simon Slavin
On 9 Mar 2015, at 9:11pm, R.Smith wrote: >> If so, do I have to create a new database and repopulate it or is there a >> way to edit the existing database from the command shell? > > There is always a way - but it is dangerous. Mister Smith's method should work perfectly. You will, of

[sqlite] C++ ORM

2015-03-09 Thread Simon Slavin
On 9 Mar 2015, at 9:38pm, Scott Robison wrote: > A co-worker who is working on a project is interested in finding out if > there is an effective ORM for C++ / SQLite. I've not used one so I'm > turning to the list to see if anyone has a recommendation. For those playing along at home, ORM ==

[sqlite] PRAGMA Synchronous safety

2015-03-11 Thread Simon Slavin
On 11 Mar 2015, at 10:35am, Mario M. Westphal wrote: > My application logs all error codes from SQLite but I have not seen anything > unusual in the logs provided to me by customers. I have even added an error > callback for SQLite (as per our recent discussion), to get more info about > the

[sqlite] data which when inserted into a table cannot be queried - a bug ?

2015-03-11 Thread Simon Slavin
> On 11 Mar 2015, at 12:10pm, Jason Vas Dias > wrote: > > I have a table: > > CREATE TABLE hosts > ( >ip INTEGER NOT NULL , >nameTEXT NOT NULL > ); > > My application does: > > BEGIN TRANSACTION; > INSERT INTO hosts > VALUES ( "a.proper.host.name",

[sqlite] PRAGMA Synchronous safety

2015-03-11 Thread Simon Slavin
On 11 Mar 2015, at 1:56pm, Mario M. Westphal wrote: > PRAGMA quick_check > > Talks ~ 120s on an average size (4 GB) database. Can you just verify for us that that PRAGMA does spot the corruption you've mentioned ? It may not be practical to build it into your app but knowing whether the

[sqlite] PRAGMA Synchronous safety

2015-03-11 Thread Simon Slavin
On 11 Mar 2015, at 2:21pm, Mario M. Westphal wrote: > I currently only have a small 30 MB database which reports ?ok? for the > pragma quick_check but > > ?row 2481 missing from index idx_settings_sndidmnun? for pragma > integrity_check. If some of the corruption you're seeing can't be

[sqlite] (no subject)

2015-03-11 Thread Simon Slavin
On 11 Mar 2015, at 2:18pm, djamel slim wrote: > I would like know the difference between SQLite and SQLite Manager, SQLite is a tool for programmers to use. It allows for easy and flexible storage and retrieval of data. If you're just someone who uses programs, and not a programmer, you'll

[sqlite] Libstringmetrics

2015-03-11 Thread Simon Slavin
> On 11 Mar 2015, at 4:56pm, Milan Roubal wrote: > > I am also facing problem with sqlite closed by windows because of crash. On > same data this query crash: > > select load_extension("libstringmetrics.dll"); > select a.vorname, b.vorname, a.nachname, b.nachname, >

[sqlite] PRAGMA Synchronous safety

2015-03-11 Thread Simon Slavin
On 11 Mar 2015, at 5:33pm, Mario M. Westphal wrote: > All recent occurrences of the problem where on local hard disks / SSD disks. > It even affects the small configuration databases my application maintains in > SQLite, with the FULL synch mode for maximum safety. These also use WAL / >

[sqlite] Libstringmetrics

2015-03-12 Thread Simon Slavin
> On 11 Mar 2015, at 10:54pm, Milan Roubal wrote: > > .load ./libstringmetrics.so > select a.firstname, b.firstname, a.lastname, b.lastname, > stringmetrics("qgrams_distance","similarity",a.firstname, b.firstname,"") > first_dist, > stringmetrics("qgrams_distance","similarity",a.lastname,

[sqlite] Libstringmetrics

2015-03-12 Thread Simon Slavin
> On 11 Mar 2015, at 11:50pm, Milan Roubal wrote: > >> SELECT stringmetrics("qgrams_distance","similarity","Roubal", >> "RoubalRoubalRoubalRo",""); > crash Then that's the one to use for debugging. It is extremely simple and contains no database access at all so now you know the problem has

[sqlite] PRAGMA Synchronous safety

2015-03-12 Thread Simon Slavin
On 12 Mar 2015, at 2:51pm, Mario M. Westphal wrote: > I dump the output to the log file so when a user sends me a log after the > diagnosis reported a ?repaired? damage, I see one or more entries like: > > ?row 2481 missing from index idx_settings_sndidmnun? > > I will see if I can collect

[sqlite] Memory leak?

2015-03-12 Thread Simon Slavin
On 12 Mar 2015, at 4:21pm, Matthias Schmitt wrote: > - The memory leak appears in the iPhone simulator more often, than on an > original iPhone device, but it appears always. > > - The leak appears with totally different type of queries. It might be, that > a leak appears in a specific query

[sqlite] Releasing a read (SHARED) lock

2015-03-13 Thread Simon Slavin
On 13 Mar 2015, at 12:17am, Barry wrote: > On 13 March 2015 at 01:21, Dinu Marina wrote: > >> You should be also aware of a more common pitfall: unclosed result sets. >> Any lock is held until you read PAST the last row or you call stmt_finalize >> (or the equivalent abstraction in your

[sqlite] Memory leak?

2015-03-13 Thread Simon Slavin
Okay. The hex you showed us doesn't represent ASCII characters, so the bug is not obviously leaking memory which contains the sort of data you'd be storing. Apart from a few sequences of 'ff00' I see no obvious patterns. How are you getting your SQLite library ? Are you calling a library

[sqlite] sqlite3_release_memory when SQLITE_THREADSAFE=0

2015-03-15 Thread Simon Slavin
On 13 Mar 2015, at 6:26pm, Xavier Snelgrove wrote: > Are there any other options here? Does the last section of help you in your situation ? Alternatively you might be able to use to manually maintain

[sqlite] SQLITE_OPEN_EXCLUSIVE

2015-03-15 Thread Simon Slavin
On 15 Mar 2015, at 6:06am, Felipe Gasper wrote: > is this how I can say, ?open a database, but only if it?s a new database?? There is no mode in SQLite which does that. You can tell it to do the opposite (only open an existing file, return an error if no file exists) but not the way you

[sqlite] Corrupted database

2015-03-16 Thread Simon Slavin
On 16 Mar 2015, at 6:35pm, Dave Dyer wrote: > This "fully repaired" database turned out to contain a duplicated set of > records which did not cause an indexing problem, but which should not have > occurred, and was consistent with a duplicated transaction. If this had > been caused by a

[sqlite] result of sqlite3_finalize zero, but sqlite3_errcode produces (rightly) SQLITE_CONSTRAINT

2015-03-17 Thread Simon Slavin
On 17 Mar 2015, at 7:39pm, Bart Smissaert wrote: > The result is fine and no duplicates are inserted, only thing wrong is the > result the one from last sqlite3_finalize. > Note that I don't check the return values in the loop, maybe I should, but > it saves some time. The result you get from

[sqlite] result of sqlite3_finalize zero, but sqlite3_errcode produces (rightly) SQLITE_CONSTRAINT

2015-03-17 Thread Simon Slavin
On 17 Mar 2015, at 8:00pm, Bart Smissaert wrote: > OK, but I can find out from sqlite3_errcode after the loop if there was an > error, saving all the checks inside the loop. > Would there be any harm from that?

[sqlite] Documentation fault for errcode.html

2015-03-17 Thread Simon Slavin
The first two sentences on this page contradict one-another. Here they are: "The sqlite3_errcode() interface returns the numeric result code or extended result code for the most recent failed sqlite3_* API call associated with a database

[sqlite] Documentation fault for errcode.html

2015-03-17 Thread Simon Slavin
On 17 Mar 2015, at 8:41pm, Richard Hipp wrote: > Modified copy found at https://www.sqlite.org/draft/c3ref/errcode.html That one is clear. Thanks. Simon.

[sqlite] result of sqlite3_finalize zero, but sqlite3_errcode produces (rightly) SQLITE_CONSTRAINT

2015-03-17 Thread Simon Slavin
On 17 Mar 2015, at 8:12pm, Bart Smissaert wrote: > Will do some timings, but as you guess the slowdown may be negligible. You know, on rereading the documentation for _reset() and _finalize() I can see why you thought you'd be able to check only the results for those calls. Unfortunately I

[sqlite] bug in transactions implementation ?

2015-03-18 Thread Simon Slavin
On 18 Mar 2015, at 8:11pm, Jason Vas Dias wrote: > The problem is, if this transaction runs in a session, then > NO transactions can ever run again in that session - eg. > if I try to run the same transaction twice : > On linux command line: > $ echo ' > BEGIN TRANSACTION; > INSERT INTO

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-18 Thread Simon Slavin
On 18 Mar 2015, at 8:51pm, Jason Vas Dias wrote: > When the sqlite3 shell is used to run a long stream of commands , eg. from > a script file or input pipe from another process, how can the success / > failure > status of the last statement be determined ? > IE. if the shell has just run an

[sqlite] bug in transactions implementation ?

2015-03-18 Thread Simon Slavin
On 18 Mar 2015, at 9:24pm, Jason Vas Dias wrote: > But now I get another error after the constraint violation : > 'Error: cannot commit - no transaction is active' > which gets back to the original point of this post, > which is that SQLite is evidently not considering > all text within 'BEGIN

[sqlite] how to determine the status of last statement in sqlite3 shell ?

2015-03-19 Thread Simon Slavin
On 19 Mar 2015, at 12:29am, Keith Medcalf wrote: > A statement may fail, however that does not affect other statements within > the transaction. You still have to end a transaction with either a commit > (to commit the changes made by statements WHICH DID NOT FAIL) or rollback to > discard

[sqlite] Why is empty string not equal to empty blob?

2015-03-19 Thread Simon Slavin
On 19 Mar 2015, at 2:56pm, Paul wrote: > Maybe this question was already asked and explained. > Or maybe it is documented somewhere (could not fiund it). > Sorry, if this is the case, but why does > > SELECT '' = x''; > > yields 0? One is a string. The other is a BLOB. SQLite doesn't even

[sqlite] Why is empty string not equal to empty blob?

2015-03-19 Thread Simon Slavin
On 19 Mar 2015, at 3:19pm, Paul wrote: > This may cause very nasty hard-to-find bugs, since SQLite allows to store any > content inside BLOB field: > > sqlite> create table foo(a int, b int, primary key(a, b)); > sqlite> insert into foo(a, b) VALUES(1, ''), (1, x''); > sqlite> select *,

[sqlite] What is the right order of the main SQLite functions?

2015-03-20 Thread Simon Slavin
On 19 Mar 2015, at 11:48pm, Bart Smissaert wrote: > Is this all how it should be? Apart from the following, nothing I see looks like it will cause problems. You should be checking the result codes of all the calls you do to make sure you are getting SQLITE_OK (==0) returned from them and

[sqlite] SQLITE_IOERR_SHORT_READ error

2015-03-20 Thread Simon Slavin
On 20 Mar 2015, at 6:12pm, Kumar Suraj wrote: > we get error SQLITE_IOERR_SHORT_READ once in a while. While > > error is Ok for us we were interested to know whether there are retries made > > internally when ever SQLite encounter this kind of error.

[sqlite] Is there a limit for the number of items in an IN clause?

2015-03-21 Thread Simon Slavin
On 21 Mar 2015, at 6:46pm, Mario M. Westphal wrote: > In a recent question > (http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/2015-March/058668.html) > I found out that joining with a single-column temporary table with 500 rows > is sometimes several hundred times (!)

[sqlite] Is there a limit for the number of items in an IN clause?

2015-03-21 Thread Simon Slavin
On 21 Mar 2015, at 9:19pm, Simon Slavin wrote: > Can someone point me to that discussion somewhere that doesn't need a > password ? Sorry, I see that it is still going on, entitled "Query times vary between 0.2 s and 30 s for very". The logic looks very weird. Simon.

[sqlite] Security issues in SQLite

2015-03-23 Thread Simon Slavin
On 23 Mar 2015, at 11:59am, Saurav Sarkar wrote: > Thanks a lot Richard for your inputs. > > the link indeed looks positive enough :). > > Would like to know if anyone else has gone through similar experiences . SQLite depends on people calling certain library routines in a certain way.

[sqlite] Very poor SQLite performance when using Win8.1 + Intel RAID1

2015-03-24 Thread Simon Slavin
On 24 Mar 2015, at 3:43pm, Rob van der Stel wrote: > Samsung 128 GB SSD Are those Samsung 830s ? Those things are insanely fast. FlushFileBuffers() does all the hard work in disk access. Other calls may end up changing only cached information whereas FlushFileBuffers() has to go mess with

[sqlite] Very poor SQLite performance when using Win8.1 + Intel RAID1

2015-03-25 Thread Simon Slavin
On 25 Mar 2015, at 12:45am, Keith Medcalf wrote: > I don't know what sort of device cache your devices have, or whether it is > volatile or not. You would have to check with the manufacturer to see how > these settings (assuming they are available) affect the actual writing to the >

[sqlite] Query times vary between 0.2 s and 30 s for very

2015-03-25 Thread Simon Slavin
On 25 Mar 2015, at 3:28am, James K. Lowden wrote: > Is there some lower bound on either the size of the IN list or the > number of rows in the table being queried? There's nothing in the language to stop you from executing "... WHERE c IN (12) ..." on a zero-row table. It won't be efficient,

[sqlite] FW: Very poor SQLite performance when using Win8.1 + Intel RAID1

2015-03-25 Thread Simon Slavin
On 25 Mar 2015, at 1:47pm, Rob van der Stel wrote: > One open issue for me remains however. Can I assume that the FlushFileBuffers > API that SQLite uses still causes cache to be written to disk even though the > 'automatic write-cache flushing' of Windows is turned off ? I can't answer your

[sqlite] Query times vary between 0.2 s and 30 s for very

2015-03-27 Thread Simon Slavin
On 26 Mar 2015, at 11:52pm, James K. Lowden wrote: > I guess I was unclear. I was asking about SQLite's implementation, > specifically whether an IN clause is always sorted using an ephemeral > table, or if that complexity is subject to some minimum threshhold. The answer to this is

[sqlite] Transpose selected rows into columns

2015-03-27 Thread Simon Slavin
> On 27 Mar 2015, at 3:48pm, Drago, William @ CSG - NARDA-MITEQ at L-3com.com> wrote: > > SerialNumber | Stim | Resp > -|---|- > .| .| . > .| .| . > 123 | V0 | 0.136 > 123 | V1 | 0.201 > 123 | V2

[sqlite] Why is empty string not equal to empty blob?

2015-03-29 Thread Simon Slavin
> On 29 Mar 2015, at 5:31pm, Luuk wrote: > > On 19-3-2015 16:02, Simon Slavin wrote: >> >> One is a string. The other is a BLOB. SQLite doesn't even get as far as >> testing the contents, it knows they are of different types. > > C:\temp>sqlite3 > SQL

[sqlite] Performance issue

2015-03-30 Thread Simon Slavin
On 30 Mar 2015, at 10:46am, Jeff Roux wrote: > This daemon is running on a HP server with 12 cores, 32 GB of RAM, > and a SSD drive. I have performance issues with some requests. For > instance, the following request takes more than 5 seconds to > accomplish with SQlite3 (in that particular

[sqlite] insert in sqlite (returning value for inserted row)

2015-04-01 Thread Simon Slavin
On 1 Apr 2015, at 2:19am, Kumar Suraj wrote: > I am using sqlite C interface for inserting data in the table. The primary > key is a 64 bit integer which i need to auto-increment and get populated > automatically as we do not provide that value in insert statement. Is there > a way i can get

[sqlite] Does column order matter for performance?

2015-05-01 Thread Simon Slavin
On 1 May 2015, at 6:49am, Pol-Online wrote: > I?m curious: how much work are we talking about here? If I have 99 INTEGER > fields followed by a BLOB one, to access the BLOB field, does SQLite need to > compute the size of each previous INTEGER field first? Given the way that SQLite uses

[sqlite] Is there an ODBC driver for SQLite

2015-05-01 Thread Simon Slavin
On 1 May 2015, at 4:28pm, Igor Korot wrote: > Is there an ODBC driver for SQLite DB? Simon.

[sqlite] Thoughts about enhancing "PRAGMA quick_check" speed

2015-05-01 Thread Simon Slavin
On 1 May 2015, at 4:58pm, Jean-Marie CUAZ wrote: > In this application, "PRAGMA quick_check" are processed in a few places as a > security measure : > - before processing backup/restore operations. > - during the process of login into the application. Answers you've already received are more

[sqlite] Thoughts about enhancing "PRAGMA quick_check" speed

2015-05-02 Thread Simon Slavin
On 2 May 2015, at 12:14pm, Jean-Marie CUAZ wrote: > Yes, a few years ago on a test db, used for developpment and testing purpose, > "PRAGMA quick_check" reported some anomalies I would not continue to use any system which occasionally caused quick_check -- or more importantly integrity-check

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-03 Thread Simon Slavin
On 3 May 2015, at 12:55am, J Decker wrote: > Yes, it really requires only a little additional work on application side. > The native open will open it in read/write share allow, and handle > interlocking. > > if you get a result of SQLITE_BUSY you need to retry the operation after a > short

[sqlite] Possible bug with locking/retying

2015-05-03 Thread Simon Slavin
In searching for something else I came across this: I don't like the fact that it's undated. For all I know this is about a three year old bug which has long since been patched. I understand the description, but not what SQLite does

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-03 Thread Simon Slavin
On 3 May 2015, at 2:03am, Scott Doctor wrote: > To review, after opening the database, issue the PRAGMA busy_timeout = x, > with x being however long I want to wait before aborting. Yes. Since you have two copies of one program, I don't need to say this for you, but for other people, the

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-03 Thread Simon Slavin
On 3 May 2015, at 3:24am, Scott Doctor wrote: > My program runs on windows and mac with a local area network connecting the > computers. Each computer has its own copy of the program, but may share the > database file which may be located on any of the computers. So I am wondering > whether

[sqlite] What software is deployed more than SQLite?

2015-05-03 Thread Simon Slavin
On 3 May 2015, at 7:18pm, Richard Hipp wrote: > There are multiple competing implementation of libc Is there a C library for understanding the FAT filesytem ? Countless devices (phone/tablet/GPS/TV/game console) have slots for PCI express/mini/micro cards and need them formatted in FAT. Is

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-03 Thread Simon Slavin
On 3 May 2015, at 9:09pm, Scott Doctor wrote: > Hmm, one for doing my own locking, one against it. As this seems to be an > obvious issue in any network, I wonder why the network developers have not > appropriately addressed this issue. They've tried. With modern operating systems locking

[sqlite] What software is deployed more than SQLite?

2015-05-03 Thread Simon Slavin
On 3 May 2015, at 9:48pm, Yahoo! Mail wrote: > How about curl? Hmm. curl is part of webkit (well, part of webcore which is part of webkit) too. It would definitely seem to be in the running. Simon.

[sqlite] What software is deployed more than SQLite?

2015-05-04 Thread Simon Slavin
On 3 May 2015, at 7:18pm, Richard Hipp wrote: > https://www.sqlite.org/draft/mostdeployed.html > > Any input you can provide is appreciated! > ? Every iPhone and iOS device iPhone is an iOS device. Better would be "Every iOS device" or "Every iPhone and iPad". > ? Every Mac

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 1:30am, James K. Lowden wrote: > That is the way most remote filesystems are designed and implemented > and documented. Cf. http://www.ietf.org/rfc/rfc1813.txt: > > 4.11 Caching policies > > The NFS version 3 protocol does not define a policy for > caching on the

[sqlite] What software is deployed more than SQLite?

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 8:26am, Clemens Ladisch wrote: > Yahoo! Mail wrote: >> How about curl? [snip] > > I would estimate that there are less networked devices without SQLite > than there are devices using SQLite but without network access. Also, anything sophisticated enough to need curl is

[sqlite] Malformed Database

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 4:09pm, Brandon wrote: > We are using SQLite in an iOS app. We are not using the 'built-in' SQLite, we > are compiling from source. We have been battling an issue where the database > becomes 'malformed'. This occurs when iOS completely crashes (blue screen, > flickering,

[sqlite] Malformed Database

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 5:48pm, Brandon Frye wrote: > I have assumed this is an iOS specific issue. This app has been in > productions for 3 years now, with the lovely iOS 8.x release - we have > started to see this problem. We have a couple thousand users, and it is > only with iOS 8.x release that

[sqlite] Malformed Database

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 6:43pm, Brandon Frye wrote: > Thanks so much for the response. Can you suggest the specific pragmas - > although I trust your insight that they may be more harmful than helpful - > I would like to read more about them (if for nothing else to make sure I > have not used them

[sqlite] SQLite 3.8.10 enters testing

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 8:23pm, Richard Hipp wrote: > A list of changes (still being revised and updated) is at > (https://www.sqlite.org/draft/releaselog/3_8_10.html). "Because of its past success, AFL became a standard part of the testing strategy for SQLite beginning with version 3.8.10. There

[sqlite] Does vacuum command improves the sqlite3 write/store transactions

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 9:01pm, Mayank Kumar (mayankum) wrote: > I am thinking about measuring the performance of sqlite3 write transactions > after lot of delete transactions have been performance but vacuum has not > been performed versus when vacuum is performed. Wanted to get some ideas here >

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-04 Thread Simon Slavin
On 4 May 2015, at 8:51pm, Scott Doctor wrote: > The issue of locking a file during concurrent access seems to be a major > issue, mostly due to the schizophrenic abilities of network file systems. Has > the SQLite development team considered embedding its own file locking system > logic,

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-05 Thread Simon Slavin
On 5 May 2015, at 11:44am, James K. Lowden wrote: > Simon Slavin wrote: > >> In contrast to NFS both SMB and AFP are designed to support networks >> properly, with caches only on the computer which hosts the file and >> locking correctly implemented. > > A

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-05 Thread Simon Slavin
On 5 May 2015, at 1:57pm, Keith Medcalf wrote: > There is no difference between a file opened over the network and one opened > locally, except that in the network open case the network filesystem does not > maintain consistency between the client view of the file and the server view > of

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
On 7 May 2015, at 9:53am, Zaumseil Ren? wrote: > To clarify, I need to shrink the dbfile, not the *wal file. The only thing that will do that under your conditions is VACUUM. Simon.

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
On 7 May 2015, at 10:12am, Zaumseil Ren? wrote: > I have done "vacuum" right before the b= output. > > But the dbfile will only shrink "after" I have closed the db. How are you measuring the size of the database file ? Simon.

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
> On 7 May 2015, at 10:46am, Zaumseil Ren? wrote: > >> How are you measuring the size of the database file ? > > Using the tcl "file" command. > > puts b=[file size $dbfile] I think tcl gets its file size from the operating system and the operating system doesn't update the size of flies

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
On 7 May 2015, at 11:25am, Zaumseil Ren? wrote: > But my problem remains :( If I do the script step by step I also do not see > the file shrink in the file explorer. > The dbfile will only shrink "after" I close the db connection. Even with an > explicit "vacuum" command. > > So the question

<    1   2   3   4   5   6   7   8   9   10   >