[sqlite] Under what circumstances can a table be locked when the database is first opened?

2015-05-22 Thread Keith Medcalf
1) Something else has the database open and locked. 2) You are using Shared Cache 3) Something forgot to finalize a select 4) The database is stored on a non-locally-attached filesystem 5) An issue in the version of SQLite you are using (and you did not say which version you are using) 6)

[sqlite] in Linux system, 2 threads can access 2 separate databases (created by sqlite3) through sqlite3?

2015-05-22 Thread Kees Nuyt
On Thu, 21 May 2015 17:54:50 +0800 (CST), "miles zhang" wrote: >dear, >thanks for your reading. >I have 2 different databases , and I create 2 threads >to access such 2 databases with sqlite3 sql statement?? You do not have to create a thread for each database connection, but it is

[sqlite] BestIndex problem

2015-05-22 Thread Emmanouil Karvounis
Thank you so much for your answers, we managed to do what we wanted. Best, Manos Stamatis On 21 May 2015 at 21:42, Dan Kennedy wrote: > On 05/21/2015 10:20 PM, Emmanouil Karvounis wrote: > >> Greetings, >> >> We are having an issue with BestIndex in our Virtual Table implementation. >> Allow

[sqlite] Download Image from Internet and add directly to Database

2015-05-22 Thread reddy ykk
Thanks All. . sqlite_bind_blob did the trick On May 22, 2015 12:37 PM, "Darko Volaric" wrote: > Use incremental blob I/O, see > > http://sqlite.org/c3ref/blob_open.html > > Note that you'll need to use INSERT or UPDATE SQL to allocate or expand > space for the blob in the database field. > > >

[sqlite] RSQLite.extfuns.dll -- Looking for Linux binary extension

2015-05-22 Thread Keith Medcalf
It looks like it is designed to "compile right in". You just need to append it to the amalgamation source file, then you just need to pass an appropriate function name in the define SQLITE3_EXTRA_INIT so that whenever a database connection is opened the function is called to perform "extra

[sqlite] (msync()+) If mmap_size is big enough, read() will never be needed, so what about enabling mmap on platforms that "lack of a unified buffer cache"?

2015-05-22 Thread Dan Kennedy
On 05/22/2015 02:37 PM, Mikael wrote: > Hi, > > If mmap_size is big enough, read() will never be needed, so what about > enabling mmap on platforms that "lack of a unified buffer cache"? > > I mean, on a 64bit platform, setting mmap_size to say 1TB should be fine - > > So what about enabling

[sqlite] Enabling mmap on OpenBSD: Anything really in the way, and how do?

2015-05-22 Thread Mikael
Dear Dr. Hipp, I suggest that your conclusion about mmap support on OpenBSD 2014-02-10: I suspect that adding msync() calls *would wipe out any speed advantage* > for using memory-mapped I/O. And since speed is the only advantage to > memory mapped I/O and because there are many disadvantages,

[sqlite] (msync()+) If mmap_size is big enough, read() will never be needed, so what about enabling mmap on platforms that "lack of a unified buffer cache"?

2015-05-22 Thread Mikael
What do you say? Also I'm curious about Dr. Hipp meant in 2013 when talking about all the BSD:s and OpenBSD in particular at http://sqlite.1065341.n5.nabble.com/SQLite-3-7-17-preview-2x-faster-td68021.html by "We have found that it does not work on OpenBSD, for reasons we have not yet been able

[sqlite] (msync()+) If mmap_size is big enough, read() will never be needed, so what about enabling mmap on platforms that "lack of a unified buffer cache"?

2015-05-22 Thread Mikael
2015-05-22 13:28 GMT+05:30 Dan Kennedy : > On 05/22/2015 02:37 PM, Mikael wrote: > >> Hi, >> >> If mmap_size is big enough, read() will never be needed, so what about >> enabling mmap on platforms that "lack of a unified buffer cache"? >> >> I mean, on a 64bit platform, setting mmap_size to say

[sqlite] RSQLite.extfuns.dll -- Looking for Linux binary extension

2015-05-22 Thread joe.fis...@tanguaylab.com
Does anyone know if a Linux binary extension of this is available (.so)? If you load RSQLite package into R you will get the RSQLite.so file that can be used as an extension in a Linux version of SQLite. It works. http://cran.r-project.org/web/packages/RSQLite/index.html (RSQLite.extfuns.dll) is

[sqlite] (msync()+) If mmap_size is big enough, read() will never be needed, so what about enabling mmap on platforms that "lack of a unified buffer cache"?

2015-05-22 Thread Mikael
Hi, If mmap_size is big enough, read() will never be needed, so what about enabling mmap on platforms that "lack of a unified buffer cache"? I mean, on a 64bit platform, setting mmap_size to say 1TB should be fine - So what about enabling mmap_size on platforms that "lack of a unified buffer

[sqlite] Enabling mmap on OpenBSD: Anything really in the way, and how do?

2015-05-22 Thread Howard Chu
Mikael wrote: > You who know SQLite all the way through, would either 1) or 2) or something > else still make a problem on OpenBSD? > > > If not, how do I use SQLite with all-file memory mapping on OpenBSD: I just Use SQLightning. https://github.com/LMDB/sqlightning -- -- Howard Chu CTO,

[sqlite] sqlite4 update

2015-05-22 Thread Jason E. Aten
Since it seems it has been some time since the last commit on the sqlite4 proejct, would someone familiar with sqlite4 be so kind as to indicate where that project stands? Is any part of it usable? Is there an outstanding todo or bug list? Thank you! Jason

[sqlite] ALTER TABLE ADD COLUMN

2015-05-22 Thread Christoph P.U. Kukulies
Am 21.05.2015 um 13:44 schrieb Simon Slavin: > On 21 May 2015, at 7:51am, Christoph P.U. Kukulies > wrote: > >> Now I wonder why I don't read >> CREATE TABLE [database] ( >> [database_name] TEXT NULL, >> [table_name] TEXT NULL, >> [data_type] TEXT NULL, >> [data_size] INTEGER NULL, >>

[sqlite] Download Image from Internet and add directly to Database

2015-05-22 Thread reddy ykk
Hi All, I am facing a problem in downloading the image files (from internet) and writing the same to SQLite Database (blob Data). 1. I dont want to encode the binary data. I just want to write as it is. So that i can fetch the image data later and draw on my screen. 2. The image data has '00'

[sqlite] BestIndex problem

2015-05-22 Thread Dan Kennedy
On 05/21/2015 10:20 PM, Emmanouil Karvounis wrote: > Greetings, > > We are having an issue with BestIndex in our Virtual Table implementation. > Allow us to illustrate the problem with a simple example. > > We create a virtual table named 'vt' that conceptually has 3 columns > "value1, value2,

[sqlite] AUTOINC vs. UUIDs

2015-05-22 Thread Stephen Chrzanowski
{{I just got a bounced message.. Reposting}} I've been watching this thread from the beginning with great interest, and I still don't see the difference between using a UUID or an auto-inc integer as a PK at the very raw, basic level. The database will only see them as a string of bits or bytes

[sqlite] AUTOINC vs. UUIDs

2015-05-22 Thread Stephen Chrzanowski
I've been watching this thread from the beginning with great interest, and I still don't see the difference between using a UUID or an auto-inc integer as a PK at the very raw, basic level. The database will only see them as a string of bits or bytes and handle accordingly. IMO, using UUID is an

[sqlite] Download Image from Internet and add directly to Database

2015-05-22 Thread Darko Volaric
Use incremental blob I/O, see http://sqlite.org/c3ref/blob_open.html Note that you'll need to use INSERT or UPDATE SQL to allocate or expand space for the blob in the database field. On Thu, May 21, 2015 at 7:17 PM, reddy ykk wrote: > Hi All, > > I am facing a problem in downloading the

[sqlite] Download Image from Internet and add directly to Database

2015-05-22 Thread Igor Tandetnik
On 5/21/2015 10:17 PM, reddy ykk wrote: > 2. The image data has '00' after 4 bytes. So, only first 4 bytes are being > written to Database as blob data. sqlite_bind_blob takes pointer to data buffer, as well as the size of that buffer. It doesn't treat zero bytes in any way special. It will