Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Tiago Rodrigues
On Fri, Aug 30, 2013 at 1:37 PM, Simon Slavin wrote: > > On 30 Aug 2013, at 4:46pm, Jay A. Kreibich wrote: > > > On Fri, Aug 30, 2013 at 03:41:18PM +0100, Simon Slavin scratched on the > wall: > > > >> The arguments against DLLs are not the normal arguments you see, > >> they're governed by an u

[sqlite] patch to

2013-08-30 Thread John McKown
I had to make a slight patch to ctime.c because sqlite3CtypeMap does not exist in an EBCDIC environment. This is for my project of getting sqlite working on z/OS UNIX. Which is doing very well. Everything compiles and I can run the sqlite3 interactive program as well as one of my test programs. $f

Re: [sqlite] VACUUM and large indices: best practice?

2013-08-30 Thread Simon Slavin
On 30 Aug 2013, at 9:32pm, uncle.f wrote: > I thought of several options: > > 1) VACUUM before creating indices, then create indices, then move database > off to storage > 2) Create indices, then VACUUM, then move off to storage > 3) Create indices, move to storage, VACUUM when already on stora

Re: [sqlite] Inefficient covering index used for Subversion with SQLite 3.8.0

2013-08-30 Thread Richard Hipp
On Fri, Aug 30, 2013 at 3:31 PM, Bert Huijben wrote: > The analyze on the very small database (which I used for the comparison > between 3.7 and 3.8) is: > Thanks for the data. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-us

[sqlite] VACUUM and large indices: best practice?

2013-08-30 Thread uncle.f
Hello all, I have a process that runs 24/7 and permanently inserts data into an SQLite database: 1) Create new database at midnight, keep it open for writing for the next 24 hours 2) There are no deletions and not even reads during the database creation 3) I use only bulk inserts wrapped in a tra

Re: [sqlite] Inefficient covering index used for Subversion with SQLite 3.8.0

2013-08-30 Thread Bert Huijben
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Richard Hipp > Sent: vrijdag 30 augustus 2013 21:16 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Inefficient covering index used for Subversion with >

Re: [sqlite] Inefficient covering index used for Subversion with SQLite 3.8.0

2013-08-30 Thread rhuijben
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Richard Hipp > Sent: vrijdag 30 augustus 2013 19:37 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Inefficient covering index used for Subversion with

Re: [sqlite] Inefficient covering index used for Subversion with SQLite 3.8.0

2013-08-30 Thread Richard Hipp
On Fri, Aug 30, 2013 at 2:44 PM, wrote: > > The query > [[ > DELETE FROM nodes WHERE wc_id = ?1 AND (local_relpath = ?2 OR > (((local_relpath) > (CASE (?2) WHEN '' THEN '' ELSE (?2) || '/' END)) AND > ((local_relpath) < CASE (?2) WHEN '' THEN X'' ELSE (?2) || '0' END))) > AND op_depth = ?3

Re: [sqlite] Inefficient covering index used for Subversion with SQLite 3.8.0

2013-08-30 Thread Richard Hipp
On Fri, Aug 30, 2013 at 12:39 PM, wrote: > Hi, > > Using the Subversion 1.7 / 1.8 wc.db schema I get quite different results > from the query planner for several of our queries, where the difference in > performance is quite huge. > Thanks for the test case. An adjustment to the

[sqlite] Inefficient covering index used for Subversion with SQLite 3.8.0

2013-08-30 Thread rhuijben
Hi, Using the Subversion 1.7 / 1.8 wc.db schema I get quite different results from the query planner for several of our queries, where the difference in performance is quite huge. For this typical example using 3.8.0.1 only one index component is used: $ EXPLAIN QUERY PLAN DELETE

Re: [sqlite] recommended extension entry point name

2013-08-30 Thread Stephan Beal
On Fri, Aug 30, 2013 at 5:53 PM, Jay A. Kreibich wrote: > be built into an SO/DLL/DYLIB and loaded dynamically, or use the same > code to build the module statically directly into an SQLite > library. ...*if* you use a custom entry point. A related advantage: a custom entrypoint allows o

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Simon Slavin
On 30 Aug 2013, at 4:46pm, Jay A. Kreibich wrote: > On Fri, Aug 30, 2013 at 03:41:18PM +0100, Simon Slavin scratched on the wall: > >> The arguments against DLLs are not the normal arguments you see, >> they're governed by an unusual combination of four characteristics of SQLite: >> >> A) SQLi

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread John McKown
Thanks to all for the insight. This only came up when somebody asked me if my "port" would have a JDBC routine. I am not much of a Java person, but it appears that this would need to be a JNI, which appears to require a DLL. I could be wrong on this point too. As I said, I'm not very Java literate.

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Simon Slavin
On 30 Aug 2013, at 2:11pm, John McKown wrote: > I know that sqlite is designed as an "embedded" SQL engine. But I am > curious if there is a specific reason to _not_ have a DLL/shared object. > The main reason I ask is that a DLL is required in order to create a sqlite > Java JDBC interface. Th

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Jay A. Kreibich
On Fri, Aug 30, 2013 at 03:41:18PM +0100, Simon Slavin scratched on the wall: > The arguments against DLLs are not the normal arguments you see, > they're governed by an unusual combination of four characteristics of SQLite: > > A) SQLite is very much liked, and a huge number of programs use it. >

Re: [sqlite] recommended extension entry point name

2013-08-30 Thread Jay A. Kreibich
On Fri, Aug 30, 2013 at 10:37:47AM +0200, Pepijn Van Eeckhoudt scratched on the wall: > http://www.sqlite.org/loadext.html states that: > ...omitting the second argument for the load_extension() SQL > interface - and the extension loader logic will attempt to > figure out t

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Igor Tandetnik
On 8/30/2013 9:11 AM, John McKown wrote: I know that sqlite is designed as an "embedded" SQL engine. But I am curious if there is a specific reason to _not_ have a DLL/shared object. What do you mean, not have? The precompiled binary for Windows (http://www.sqlite.org/download.html) is a DLL.

Re: [sqlite] recommended extension entry point name

2013-08-30 Thread Richard Hipp
On Fri, Aug 30, 2013 at 9:42 AM, Pepijn Van Eeckhoudt < pep...@vaneeckhoudt.net> wrote: > So for new development sqlite3_X_init is preferred over > sqlite3_extension_init? > That's my preference. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mai

Re: [sqlite] recommended extension entry point name

2013-08-30 Thread Pepijn Van Eeckhoudt
On vr, 2013-08-30 at 09:09 -0400, Richard Hipp wrote: > On Thu, Aug 29, 2013 at 3:53 AM, Pepijn Van Eeckhoudt < > pep...@vaneeckhoudt.net> wrote: > Recently the extension loader was enhanced (I think for 3.7.17) so that it > tries the first naming schema first, then if that fails it tries > sqlite3

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread John McKown
Tristan, Thanks. I must have done something wrong when I did the ./configure. I didn't find a libsqlite.so, just a libsqlite.a . I'll take a deeper look at the options I used. I am getting this running on an obscure UNIX variant myself. From a Windows / UNIX / Linux perspective, it is a real weir

Re: [sqlite] Changed behavior from 3.7.17 to 3.8.0.

2013-08-30 Thread Richard Hipp
On Thu, Aug 29, 2013 at 1:01 PM, Peter Aronson wrote: > I don't know if this is serious, but a SAVEPOINT command fails with an > open statement handle used to execute PRAGMA journal_mode = off > SAVEPOINT and journal_mode=OFF do not play well together. Please do not do that. -- D. Richard Hip

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Richard Hipp
On Fri, Aug 30, 2013 at 9:11 AM, John McKown wrote: > I know that sqlite is designed as an "embedded" SQL engine. But I am > curious if there is a specific reason to _not_ have a DLL/shared object. > The main reason I ask is that a DLL is required in order to create a sqlite > Java JDBC interface.

Re: [sqlite] Database File Size

2013-08-30 Thread Simon Slavin
On 30 Aug 2013, at 5:37am, techi eth wrote: > I am using Jffs2 file system. As of now I using all default from > sqlite3.I am not sure with this information it is possible to get some > approx that with 'X KB data, database file size will be 'Y' KB or MB. Your best way to figure this out is to

Re: [sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread Tristan Van Berkom
On Fri, 2013-08-30 at 08:11 -0500, John McKown wrote: > I know that sqlite is designed as an "embedded" SQL engine. But I am > curious if there is a specific reason to _not_ have a DLL/shared object. > The main reason I ask is that a DLL is required in order to create a sqlite > Java JDBC interface

[sqlite] curious: Why no "shared library" or DLL?

2013-08-30 Thread John McKown
I know that sqlite is designed as an "embedded" SQL engine. But I am curious if there is a specific reason to _not_ have a DLL/shared object. The main reason I ask is that a DLL is required in order to create a sqlite Java JDBC interface. Thanks. -- As of next week, passwords will be entered in

Re: [sqlite] recommended extension entry point name

2013-08-30 Thread Richard Hipp
On Thu, Aug 29, 2013 at 3:53 AM, Pepijn Van Eeckhoudt < pep...@vaneeckhoudt.net> wrote: > http://www.sqlite.org/loadext.html states that: > ...omitting the second argument for the load_extension() SQL > interface - and the extension loader logic will attempt to > figure out

Re: [sqlite] Database locking Error

2013-08-30 Thread Simon Slavin
On 30 Aug 2013, at 5:36am, techi eth wrote: > Thanks for suggestion. I will take it forward. > > locking will happen with two simultaneous processes accessing for read also? I don't think it can happen if they're both reading. But a process which is reading could block a process which is wri

Re: [sqlite] Table Creation Behaviour!!!

2013-08-30 Thread Hick Gunter
The default behaviour of INSERT when running into a PRIMARY KEY, UNIQUE or NOT NULL constraint is ABORT, i.e. back out any changes made by the current statement and return an error. You may select a different behavior if your application logic so requires, the other choices being ROLLBACK the

Re: [sqlite] Table Creation Behaviour!!!

2013-08-30 Thread techi eth
Thanks. What about INSERT query behavior. Is their any specific reason of allowing inserting same data set which is already present in database ? Cheers - On 8/30/13, Clemens Ladisch wrote: > techi eth wrote: >> I have open the connection, created the table by using CREATE TABLE IF >> NOT >> E

Re: [sqlite] Path Length Limit on Windows

2013-08-30 Thread Jan Nijtmans
>Date: Wed, 28 Aug 2013 14:21:24 -0400 >From: Richard Hipp > >The latest check-in on trunk adds a new windows VFS module called >"win32-longpath" which accepts the full-length 32KB pathnames. Add the >string "win32-longpath" as the 4th argument to sqlite3_open_v2() (on >windows only, of course) a

[sqlite] recommended extension entry point name

2013-08-30 Thread Pepijn Van Eeckhoudt
http://www.sqlite.org/loadext.html states that: ...omitting the second argument for the load_extension() SQL interface - and the extension loader logic will attempt to figure out the entry point on its own. It will first try the generic extension name "sqlite3_extens

Re: [sqlite] Changed behavior from 3.7.17 to 3.8.0.

2013-08-30 Thread Clemens Ladisch
Peter Aronson wrote: > a SAVEPOINT command fails with an open statement handle used to > execute PRAGMA journal_mode = off at SQLite 3.8.0, but appears to > succeed at SQLite 3.7.17. This does not appear to be documented. says: | An implicit transacti

Re: [sqlite] Splitting a monolithic table into two related ones.

2013-08-30 Thread Clemens Ladisch
Flakheart wrote: > I need to split a table into two as the current monolithic structure is > incredibly wasteful but don't know how to do such a possibly complicated > thing. I remember an analyser available years ago for MS Access database > that did this but none found for SQLite. > > My bloated

Re: [sqlite] Table Creation Behaviour!!!

2013-08-30 Thread Clemens Ladisch
techi eth wrote: > I have open the connection, created the table by using CREATE TABLE IF NOT > EXISTS , doing some operation & closing the connection. > > If I again open the connection & try to do table creation again (With same > table name & same database file) then what will be the behavior? >

Re: [sqlite] T-SQL to retrieve needed records

2013-08-30 Thread Clemens Ladisch
jdp12383 wrote: > This table stores webcam recordings. Each record is a recording up to 3 min. > I am trying to retrieve one record per continuous recording. If there is > gap more than 3 min then it would be considered as a separate recording. > > CREATE TABLE recordings ( > [key] INT

[sqlite] Table Creation Behaviour!!!

2013-08-30 Thread techi eth
Query Regarding Table Creation : I have open the connection, created the table by using CREATE TABLE IF NOT EXISTS , doing some operation & closing the connection. If I again open the connection & try to do table creation again (With same table name & same database file) then what will be the beh

Re: [sqlite] T-SQL to retrieve needed records

2013-08-30 Thread Hick Gunter
The square brackets are very misleading... You need to join the table to itself to find consecutive recordings (ON datetime(t1.end_datetime,'3 minutes') >= t2.start_datetime). It may be a good idea to have a field "sequence_id" to store the sequence number in. Iterative solution: UPDATE record